@globant/coda-windows-x64 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/assets/agents/coda-help.md +166 -0
  2. package/assets/agents/create-workflow.md +264 -0
  3. package/assets/agents/explore.md +26 -0
  4. package/assets/docs/agents.md +162 -0
  5. package/assets/docs/cli-reference.md +131 -0
  6. package/assets/docs/cli-vs-batch.md +58 -0
  7. package/assets/docs/config-json.md +314 -0
  8. package/assets/docs/config-reference.md +329 -0
  9. package/assets/docs/configuration.md +105 -0
  10. package/assets/docs/connect-provider.md +77 -0
  11. package/assets/docs/extensions.md +260 -0
  12. package/assets/docs/faq.md +152 -0
  13. package/assets/docs/glossary.md +41 -0
  14. package/assets/docs/guide-automate.md +135 -0
  15. package/assets/docs/guide-changes.md +101 -0
  16. package/assets/docs/guide-collaborate.md +119 -0
  17. package/assets/docs/guide-extend.md +120 -0
  18. package/assets/docs/guide-understand.md +95 -0
  19. package/assets/docs/hooks.md +704 -0
  20. package/assets/docs/how-it-works.md +73 -0
  21. package/assets/docs/index.md +62 -0
  22. package/assets/docs/installation.md +71 -0
  23. package/assets/docs/logging.md +123 -0
  24. package/assets/docs/overview.md +91 -0
  25. package/assets/docs/permissions.md +93 -0
  26. package/assets/docs/quickstart.md +104 -0
  27. package/assets/docs/sessions.md +139 -0
  28. package/assets/docs/shortcuts.md +61 -0
  29. package/assets/docs/tools-reference.md +81 -0
  30. package/assets/docs/workflows.md +146 -0
  31. package/assets/skills/create-extension/SKILL.md +293 -0
  32. package/assets/skills/create-hook/SKILL.md +442 -0
  33. package/assets/skills/create-skill/SKILL.md +180 -0
  34. package/assets/skills/plan/SKILL.md +25 -0
  35. package/coda.exe +0 -0
  36. package/lib/keytar/build/Release/keytar.node +0 -0
  37. package/lib/keytar/lib/keytar.js +43 -0
  38. package/lib/opentui/assets/javascript/highlights.scm +205 -0
  39. package/lib/opentui/assets/javascript/tree-sitter-javascript.wasm +0 -0
  40. package/lib/opentui/assets/markdown/highlights.scm +150 -0
  41. package/lib/opentui/assets/markdown/injections.scm +27 -0
  42. package/lib/opentui/assets/markdown/tree-sitter-markdown.wasm +0 -0
  43. package/lib/opentui/assets/markdown_inline/highlights.scm +115 -0
  44. package/lib/opentui/assets/markdown_inline/tree-sitter-markdown_inline.wasm +0 -0
  45. package/lib/opentui/assets/typescript/highlights.scm +604 -0
  46. package/lib/opentui/assets/typescript/tree-sitter-typescript.wasm +0 -0
  47. package/lib/opentui/assets/zig/highlights.scm +284 -0
  48. package/lib/opentui/assets/zig/tree-sitter-zig.wasm +0 -0
  49. package/lib/opentui/parser.worker.js +4244 -0
  50. package/lib/opentui/tree-sitter-3jzf13jk.wasm +0 -0
  51. package/lib/ripgrep/COPYING +3 -0
  52. package/lib/ripgrep/LICENSE-MIT +21 -0
  53. package/lib/ripgrep/UNLICENSE +24 -0
  54. package/lib/ripgrep/rg.exe +0 -0
  55. package/package.json +20 -0
@@ -0,0 +1,139 @@
1
+ # Sessions & Checkpoints
2
+
3
+ Every time you run CODA, it creates a session — a persistent record of everything that happened: your prompts, CODA's responses, every file it read, every command it ran. Sessions let you pick up where you left off, and checkpoints let you undo what went wrong.
4
+
5
+ ## Resume where you left off
6
+
7
+ When you exit CODA (`Ctrl+C` twice or `/exit`), the session is saved. To continue it later:
8
+
9
+ ```bash
10
+ # Resume the last session
11
+ coda --lastsession
12
+
13
+ # Resume a specific session by ID (-s is a short alias)
14
+ coda --session-id <id>
15
+ coda -s <id>
16
+ ```
17
+
18
+ When you exit, CODA prints the exact command to resume — `coda --session-id <id>` — ready to copy and paste. You can also browse and switch sessions from inside the TUI:
19
+
20
+ ```text
21
+ /sessions
22
+ ```
23
+
24
+ From the `/sessions` manager you can **resume, rename, or delete** any saved session.
25
+
26
+ > **Note:** `--lastsession` and `--session-id` / `-s` are mutually exclusive — using them together will produce an error. Sessions are scoped to the project directory you launched from, so `coda --lastsession` resumes the last session *for this project*, not globally.
27
+
28
+ **Keyboard controls in the `/sessions` overlay:** `↑`/`↓` move, `←`/`→` page, **Enter** resume, **r** rename, **d** delete (asks to confirm), **q** or **Esc** to close.
29
+
30
+ ### Where sessions are stored
31
+
32
+ Sessions persist in a global SQLite database at `~/.coda/coda.db` (override the location with `CODA_HOME`). Each session has a stable id — the one printed on exit and shown in `/sessions` — and is scoped to the project directory you launched from. A few per-session override files (such as a session-level `mcp.json`) live under `~/.coda/sessions/<sessionId>/`, but the session record itself is in the database, not in your project's `.coda/` folder. Because it's persisted to disk, a session survives closing your terminal, rebooting, even upgrading CODA. The `/clear` command wipes a session's message history while keeping the session itself; `/sessions` → delete removes it entirely.
33
+
34
+ ## Start fresh without losing the old session
35
+
36
+ To start a new conversation without exiting CODA:
37
+
38
+ ```text
39
+ /new
40
+ ```
41
+
42
+ This opens a new session. The previous session is saved and can be resumed later — nothing is lost.
43
+
44
+ ## Checkpoints: undo at any point
45
+
46
+ CODA takes a checkpoint (a file snapshot) before each turn — before it acts on the message you just sent. Snapshots are stored in a private shadow repository under `~/.coda/checkpoints/<project-hash>/` (one subdirectory per project, named by a hash of the project directory's absolute path), so your project's own Git history and commits are never touched.
47
+
48
+ Think of a checkpoint as **"the state from before this message ran."** If a prompt leads CODA in the wrong direction, restore the checkpoint for that turn to return your files to the exact state they had before CODA processed it.
49
+
50
+ CODA snapshots at a few different moments, and the `/timeline` picker labels each row so you can tell them apart:
51
+
52
+ | Trigger | When it fires | Picker badge |
53
+ | --- | --- | --- |
54
+ | Per-turn | Before CODA acts on a prompt you sent | `turn` |
55
+ | Pre-destructive-bash | Before a risky shell command (`rm`, `mv`, `sed -i`, `>`, `>>`, `git reset`/`clean`/`checkout`) | `bash` |
56
+ | Pre-restore | Right before a restore — this is what powers the undo stack | `↩ undo` |
57
+
58
+ A `turn` row rewinds to the state **before** the agent acted on that message. Turns that don't touch any files still get a row (so the conversation has a restore anchor) but reuse the previous snapshot, so they cost no extra disk.
59
+
60
+ To view and restore checkpoints, open the timeline picker:
61
+
62
+ ```text
63
+ /timeline
64
+ ```
65
+
66
+ You can also type `/rewind` or press **Esc** twice when the chat input is empty. Select any checkpoint to restore your files to that exact state — this is your undo button for anything CODA does to your codebase. Restoring also rewinds the conversation back to that point. (Your chat history isn't altered by editing files; only a restore rewinds it.)
67
+
68
+ > **Checkpoints require Git 2.5.0+.** If Git is unavailable or too old, checkpoints are disabled automatically and CODA tells you at startup. Checkpoints are a TUI feature: the `/timeline` picker doesn't exist in headless (batch) mode, so there's no way to restore there. They're off by default in batch; you can force snapshots on with `--checkpoints=true` for an audit trail, but you won't be able to roll back without the interactive UI.
69
+
70
+ ### What a snapshot captures (and what it skips)
71
+
72
+ A checkpoint records your **project worktree files** at that moment — but not everything. CODA always skips build artifacts, caches, and a few protected paths so snapshots stay fast and safe:
73
+
74
+ `.git`, `.coda/sessions`, `.coda/MEMORY.md`, `.coda/agents`, `.coda/offload`, `.coda/checkpoint-repo`, `node_modules`, `.venv`, `venv`, `dist`, `build`, `.next`, `.turbo`, `__pycache__`, `.pytest_cache`, `.cache`, `target`, `.gradle`, `.mypy_cache`, `.tox`, and similar. On Windows, filesystem-reserved device names (`nul`, `con`, `prn`, `aux`, `com1`–`com9`, `lpt1`–`lpt9`) are also excluded.
75
+
76
+ Very large directories (more than ~200 files) are skipped too, to keep snapshots fast; `/checkpoint-status` lists any it dropped this way under **Skipped dirs**.
77
+
78
+ Two things are deliberately protected:
79
+
80
+ - **`.coda/MEMORY.md`** is excluded at both capture and restore time, so your agent's memory **survives every rollback** intact.
81
+ - **`.git/`** is never touched — your project's own Git history is completely separate.
82
+
83
+ ### Exclude your own paths with `.codaignore`
84
+
85
+ To keep additional project-local paths out of snapshots, add a `.codaignore` file at your project root. It uses gitignore syntax (including negations), so you can exclude large data folders, generated output, or anything you don't want captured.
86
+
87
+ Two things to know: `.codaignore` is read **once at session start**, so restart `coda` after editing it. And negations (`!path`) are honored last and apply across every layer — a negation can re-include a path that an earlier pattern *or* the always-on static exclusions (`.git`, `node_modules`, …) would have dropped. That's a deliberate, opt-in escape hatch: writing `!secrets/keep-me.txt` to snapshot an otherwise-excluded path is treated as a conscious choice. (Restoring never overwrites `.coda/MEMORY.md`, so your agent's memory survives a rollback regardless.)
88
+
89
+ ### Drift detection
90
+
91
+ If your worktree has uncaptured changes when you try to restore — your own edits, or agent output from the current turn that hasn't been snapshotted yet — CODA **stops the restore** so you don't silently lose work. The drift report groups the affected files into **Modified**, **Added (would be removed by restore)**, and **Deleted (would be restored)**, with a per-file line-count delta.
92
+
93
+ You have three ways forward:
94
+
95
+ - **Esc** — cancel the restore and keep your current files.
96
+ - **F** — force the restore through, discarding the drifted changes (only if you're sure). You can also press `F` directly in the picker list (before drift is detected) to initiate a force-restore immediately without a drift check.
97
+ - **Send a new prompt** — this snapshots the current state as a normal turn, which clears the drift, after which you can restore cleanly.
98
+
99
+ The top of the picker also has an **Undo your last restore** entry, in case a restore itself went the wrong way. Each restore creates its own pre-restore snapshot, so you can undo an undo repeatedly.
100
+
101
+ ### Verify checkpoints work
102
+
103
+ After an install or upgrade, you can smoke-test the whole subsystem against a throwaway project:
104
+
105
+ ```bash
106
+ coda checkpoints-demo
107
+ ```
108
+
109
+ It runs through snapshot, restore, undo, drift handling, and memory preservation, then exits in a few seconds — no real session needed.
110
+
111
+ ### When checkpoints turn themselves off
112
+
113
+ Checkpoints disable **gracefully** for the rest of a session (no crash, just no more snapshots) when any of these happen:
114
+
115
+ - **Git is missing or older than 2.5.0.**
116
+ - **The worktree exceeds `checkpoints.maxWorktreeFiles`** (default 100,000) — add big folders to `.codaignore` and restart, or raise the cap.
117
+ - **Snapshot disk usage passes the hard cap** (`checkpoints.diskHardCapMb`, default 5 GiB) — wait for background cleanup, raise the cap, or clear `~/.coda/checkpoints/`.
118
+
119
+ If snapshots fail three times in a row, CODA auto-recovers by re-initializing the shadow repo and warns you in chat — earlier history for that session is no longer reachable, and a fresh history starts from the next snapshot.
120
+
121
+ ### Diagnose with `/checkpoint-status`
122
+
123
+ When the `/timeline` picker is empty or a session reports checkpoints disabled, run:
124
+
125
+ ```text
126
+ /checkpoint-status
127
+ ```
128
+
129
+ It prints a health summary: current **State**, the **project** + **workspace id**, the **shadow repo** path, **disk usage** against the soft/hard caps, the **checkpoint count** (for this session and across sessions sharing the project), and any **Skipped dirs**. Multiple `coda` instances in the same project directory share one shadow repo safely; each session only sees its own rows in `/timeline`, while cross-session totals show up here.
130
+
131
+ ## Watch the context fill level
132
+
133
+ The status bar at the bottom of the TUI shows a context fill percentage. When it approaches 100%, CODA will automatically compact the session history. If you're deep in a long session and things start feeling off, try:
134
+
135
+ ```text
136
+ /compact
137
+ ```
138
+
139
+ Or start a `/new` session and bring in just the relevant context for your next task.
@@ -0,0 +1,61 @@
1
+ # Keyboard Shortcuts
2
+
3
+ These shortcuts work inside the interactive TUI. Type `?` at any time to open the shortcuts overlay, or `/help` for the full command list (extensions may add more).
4
+
5
+ ## Global
6
+
7
+ | Shortcut | Action |
8
+ | --- | --- |
9
+ | `Ctrl+C` × 2 | Exit CODA (double-press within ~1500 ms; a single press never exits) |
10
+ | `Ctrl+L` | Clear the conversation (same as `/clear`) |
11
+ | `Ctrl+B` | Toggle the sidebar |
12
+
13
+ ## In the chat input
14
+
15
+ | Shortcut | Action |
16
+ | --- | --- |
17
+ | `Enter` | Send your message |
18
+ | `Ctrl+J` | Insert a newline without sending |
19
+ | `↑` / `↓` | Navigate input history |
20
+ | `/` | Open the slash command palette |
21
+ | `@` | Attach a file — opens the file-path browser |
22
+ | `?` | Open the keyboard-shortcuts overlay |
23
+
24
+ > **Tip — attach screenshots.** Paste a path to an image file (or paste the image itself where your terminal supports it) and CODA picks it up as visual context — it shows a short `[Image N]` marker so you know it'll be sent. Useful for sharing a screenshot of an error or a UI mockup.
25
+
26
+ ## During a turn
27
+
28
+ | Shortcut | Action |
29
+ | --- | --- |
30
+ | `Esc` | Interrupt the current turn (once the agent has started) |
31
+ | `Ctrl+O` | Toggle "thinking" visibility |
32
+ | `Ctrl+G` | Clear any messages queued while the agent is busy |
33
+
34
+ ## Transcript navigation
35
+
36
+ | Shortcut | Action |
37
+ | --- | --- |
38
+ | `Ctrl+↑` | Scroll up in the transcript |
39
+ | `Ctrl+↓` | Scroll down in the transcript |
40
+ | `Ctrl+Shift+C` | Copy the last code block to clipboard |
41
+ | `Esc Esc` | Open the timeline picker (double-press within ~750 ms when the chat input is empty and no turn is running) |
42
+
43
+ ## Model switching
44
+
45
+ | Shortcut | Action |
46
+ | --- | --- |
47
+ | `Shift+Tab` | Cycle through favorite models |
48
+
49
+ Mark models as favorites from the `/switch-model` picker; `Shift+Tab` then rotates through just that shortlist, so you can flip between (say) a strong reasoning model and a cheaper everyday one without opening a menu.
50
+
51
+ ## Two shortcuts worth memorizing
52
+
53
+ If you only remember two, make them these:
54
+
55
+ - **`Esc`** — interrupt the current turn the moment CODA heads the wrong way. Interrupting and redirecting is faster than undoing.
56
+ - **`Esc Esc`** (when the input is empty) — open the timeline picker to roll your files back to before any earlier turn.
57
+
58
+ ## See also
59
+
60
+ - [Commands & Flags](#cli-reference) — the slash commands these shortcuts complement.
61
+ - [Make Changes Safely](#guide-changes) — using **Esc**, the timeline, and message steering to stay in control.
@@ -0,0 +1,81 @@
1
+ # Tools Reference
2
+
3
+ **Tools** are the capabilities CODA's agent can use to actually do work: read a file, run a shell command, search the codebase, call an MCP server, load a skill, or delegate to a sub-agent. You don't type tool names yourself — CODA picks the right tool for each task. This page maps the built-in tools and what you can configure about them.
4
+
5
+ ## How tools show up
6
+
7
+ CODA builds a **tool registry** for each session. Which tools are available depends on a few things:
8
+
9
+ - **Provider** — some tools (like web search or vision) require a Glob.AI OS profile.
10
+ - **MCP configuration** — connected servers add their own tools.
11
+ - **Agents** — delegation tools appear only when agents are enabled.
12
+ - **Extensions and plugins** — these can register additional tools.
13
+
14
+ Some tools pause for **approval** before doing something risky — see [Permissions & Approvals](#permissions). Headless runs use a stricter set: the `ask_user` tool isn't available, and bash defaults to a higher auto-approval tier.
15
+
16
+ To limit which tools a single run may use, pass `coda --tools …` (see [Commands & Flags](#cli-reference)).
17
+
18
+ ## Built-in tools
19
+
20
+ | Tool | What it does |
21
+ | --- | --- |
22
+ | `read` | Read file contents, with pagination and encoding handling |
23
+ | `write` | Create or overwrite files; asks before overwriting a file it never read this session |
24
+ | `edit` | Apply structured search-and-replace edits to existing files |
25
+ | `bash` | Run shell commands, gated by risk tiers and approval prompts |
26
+ | `glob` | Find files by path pattern (fast file finder) |
27
+ | `grep` | Search file contents (powered by ripgrep) |
28
+ | `think` | A lightweight scratchpad step the model can use to reason |
29
+ | `memory` | Read or update `MEMORY.md` notes; consolidating can ask for approval |
30
+ | `ask_user` | Ask you a question in the UI (interactive sessions only) |
31
+ | `web_search` | Search the web (Glob.AI OS profiles with search configured) |
32
+ | `examine_images` | Analyze image files with a vision model (Glob.AI OS) |
33
+ | `omni_parser` | Extract text and data from documents and media (Glob.AI OS) |
34
+ | `mcp_execute` | Call a tool on an MCP server you've connected |
35
+ | `skills` | Load a discovered skill by name |
36
+ | `run_agent`, `wait_agents`, `cancel_agent` | Start and manage delegated [agent](#agents) runs |
37
+ | `workflow` | Run a named workflow script that orchestrates multiple agents in the background (requires agents to be enabled) |
38
+
39
+ Extensions and plugins can register more tools the same way the core registers these built-ins.
40
+
41
+ ### How CODA chooses a tool
42
+
43
+ You never name a tool — CODA picks based on the task. A few patterns are worth knowing so its behavior feels predictable:
44
+
45
+ - **To find files**, it uses `glob` (path patterns) before reading anything.
46
+ - **To find text inside files**, it uses `grep` (ripgrep) rather than reading file after file.
47
+ - **To read a known file**, it uses `read`, often with an offset/limit on large files.
48
+ - **To change a file**, it prefers `edit` (surgical search-and-replace) over `write` (whole-file overwrite), and `write` asks before clobbering a file it never read this session.
49
+ - **To run anything in your shell** — tests, linters, git — it uses `bash`, gated by your approval level.
50
+ - **For big or parallel work**, it may delegate with `run_agent` (see [Agents](#agents)) instead of doing it all inline.
51
+
52
+ The search tools deserve special mention because they're the backbone of fast, accurate work: `glob` and `grep` let CODA locate the right code without loading the whole repo into context.
53
+
54
+ ## What you can configure
55
+
56
+ Tool behavior is configured in a few different places — some from the `/settings` panel, some from your config files, and some from dedicated managers. The highlights:
57
+
58
+ | Area | What you control | Where |
59
+ | --- | --- | --- |
60
+ | **Bash** | Approval level and shell mode — how often CODA asks before running commands, and which shell it uses. See [Permissions & Approvals](#permissions). | `/settings` → Bash Tool Preferences |
61
+ | **Search** | Enable or disable `glob` and `grep`, the `grep` backend (ripgrep or fastgrep), and result limits. Ripgrep ships bundled — no separate install needed. | Config file (`tools.glob`, `tools.grep`) |
62
+ | **Vision** | The model used by `examine_images`. | Config file (`vision.model`) |
63
+ | **Web search** | The model used for web search (Glob.AI OS). | `CODA_WEBSEARCH_MODEL` env var (falls back to the built-in default) |
64
+ | **OmniParser** | How much extracted document text is inlined in a result vs written to `.coda/omni-parser/`. | `CODA_OMNI_PARSER_INLINE_THRESHOLD_CHARS` env var |
65
+ | **MCP** | Which servers load — which in turn decides whether `mcp_execute` is useful. | The `/mcp` manager |
66
+ | **Agents** | Whether the delegation tools exist, and how runs behave. See [Agents](#agents). | Config (`agents.*`) + the `/agents` manager |
67
+
68
+ ## Tools inside agent runs
69
+
70
+ When a delegated [agent](#agents) run executes, it uses a trimmed tool set. Two categories are removed from every child session:
71
+
72
+ - **Delegation tools** — `run_agent`, `wait_agents`, and `cancel_agent` are unregistered, so a sub-agent **cannot delegate further** (no nested sub-agents) or wait on other runs.
73
+ - **User prompting** — `ask_user` is unregistered, so a sub-agent **cannot prompt you** for input. It must complete its task from the instructions it was given.
74
+
75
+ The `skills` tool is also unavailable in child sessions — skill loading is main-agent-only. The remaining parent tools (read, edit, write, bash, search, etc.) are inherited, and the MCP service is deliberately shared, so `mcp_execute` also works inside a child run.
76
+
77
+ ## See also
78
+
79
+ - [How CODA Works](#how-it-works) — tools, memory, and the agent loop in context.
80
+ - [Permissions & Approvals](#permissions) — when and why tools pause to ask.
81
+ - [Extend CODA](#guide-extend) — adding tools via MCP, extensions, and plugins.
@@ -0,0 +1,146 @@
1
+ # Workflows
2
+
3
+ A **workflow** is a deterministic script that orchestrates **multiple agents** for you — fanning work out in parallel, running multi-stage pipelines, looping until a budget or count is reached, and synthesizing the results. Where a single [agent](#agents) handles one task, a workflow coordinates many, with the shape of the work decided at runtime.
4
+
5
+ Use a workflow when one agent (or a few inline steps) won't cover the job well — for example a repo-wide audit, reviewing every file in a changeset, or any sweep where coverage and confidence matter more than speed.
6
+
7
+ > Workflows are **opt-in and token-expensive** — they can spin up many agent runs. Reach for one when the scale clearly warrants orchestration or when you've asked for thoroughness; otherwise a single agent is cheaper and faster.
8
+
9
+ ## Run a workflow
10
+
11
+ You don't need a special command. Just ask in plain language — if a matching workflow exists, CODA runs it. You can name the workflow explicitly, or just describe what you want and let CODA match it:
12
+
13
+
14
+ ```text
15
+ Create a workflow to do an independent per-principle SOLID audit — one reviewer per principle (SRP/OCP/LSP/ISP/DIP), each finding adversarially verified, synthesized into per-principle verdicts + a prioritized fix list. Write an artifact with your findings.
16
+ ```
17
+
18
+ ```text
19
+ Kick off the security-audit workflow across the whole repo, use multiple subagents. Write an artifact when finished.
20
+ ```
21
+
22
+ CODA reads the arguments each workflow needs straight from your request (the diff to review, the folder to scan, the output location) and only asks when something required can't be inferred.
23
+
24
+ A few things to know about how runs behave:
25
+
26
+ - **They run in the background.** CODA shows a "running" notice and keeps the session responsive. You get the outcome on a later turn, when CODA posts a short overview of what the workflow produced (including links to any artifacts it wrote).
27
+ - **CODA infers the inputs.** It reads the arguments a workflow needs from your request, and only asks you when something required can't be determined.
28
+ - **Track progress anytime** from the dashboard (below).
29
+
30
+ ## Watch and stop runs with `/workflows`
31
+
32
+ Open the workflow dashboard to see live progress as a tree of phases and agent cards, plus the history of past runs:
33
+
34
+ ```text
35
+ /workflows
36
+ ```
37
+
38
+ To stop a run:
39
+
40
+ - **Command:** `/workflows stop <runId>` stops that run; `/workflows stop` (no id) stops **all** in-flight runs for the session.
41
+ - **Dashboard:** press **`c`** on a running entry to cancel it.
42
+
43
+ ## Create a workflow
44
+
45
+ You don't write the script by hand. Ask CODA to build one and it delegates to the built-in **`create-workflow`** agent, which authors the workflow module and saves it for you:
46
+
47
+ ```text
48
+ Create a workflow to do an independent per-principle SOLID audit — one reviewer per principle (SRP/OCP/LSP/ISP/DIP), each finding adversarially verified, synthesized into per-principle verdicts + a prioritized fix list. Write an artifact with your findings.
49
+ ```
50
+
51
+ The same plain-language request works for any of the shapes a workflow is good at — describe the goal and let `create-workflow` design the phases:
52
+
53
+ ```text
54
+ Create a workflow that translates every Markdown doc under content/ to Spanish and reports a summary
55
+ ```
56
+
57
+ ```text
58
+ Create a workflow that reviews every file in my staged diff and cross-checks the findings into one report
59
+ ```
60
+
61
+ ```text
62
+ Create a workflow that audits each package for missing error handling and writes one findings report
63
+ ```
64
+
65
+ ```text
66
+ Create a workflow that researches a question from several angles in parallel, then synthesizes one answer
67
+ ```
68
+
69
+ ```text
70
+ Create a workflow that runs each file in a folder through a lint → fix → verify pipeline
71
+ ```
72
+
73
+ ```text
74
+ Create a workflow that keeps generating test ideas until it finds no new ones or hits a budget
75
+ ```
76
+
77
+ > **Tip — name the inputs.** Mentioning the folder, the diff, or the output location in your request helps `create-workflow` set up the workflow's arguments, so later runs can infer them from a one-line prompt.
78
+
79
+ The `create-workflow` agent **writes the file but doesn't run it**. The **first** time you run a freshly authored workflow, CODA asks you to confirm — you can approve it, view the generated script, or decline. After that first confirmation, running it again goes straight to the background.
80
+
81
+ ## Workflow authoring conventions
82
+
83
+ Workflow scripts support two conventions:
84
+
85
+ - **Coda-native:** export a `run(ctx: WorkflowContext)` function. All primitives are accessed via the `ctx` parameter.
86
+ - **Bare-globals:** top-level body with ambient primitives — the Claude Code-compatible style. CODA loads these through a compatibility layer that injects `agent`, `parallel`, `pipeline`, `phase`, `log`, `workflow`, `args`, `budget`, `writeArtifact`, `copyArtifactTo`, `now`, `random`, and `signal` as globals.
87
+
88
+ **Key context primitives:**
89
+
90
+ | Primitive | What it does |
91
+ | --- | --- |
92
+ | `ctx.agent(task, options?)` | Run an agent task and return its result |
93
+ | `ctx.parallel(tasks)` | Fan out tasks concurrently |
94
+ | `ctx.pipeline(stages)` | Run agents in serial stages |
95
+ | `ctx.phase(title)` | Group agents under a named phase in the dashboard |
96
+ | `ctx.log(message)` | Emit a progress message visible in the dashboard |
97
+ | `ctx.workflow(nameOrRef, args?)` | Invoke another workflow by name or path |
98
+ | `ctx.writeArtifact(name, content)` | Persist a deliverable to disk as a named artifact |
99
+ | `ctx.copyArtifactTo(artifactPath, destDir)` | Copy a written artifact to a user-specified directory |
100
+ | `ctx.budget` | Token-budget object with `.spent()` and `.remaining()` methods |
101
+ | `ctx.signal` | `AbortSignal` for cooperative cancellation |
102
+
103
+ ## Where workflows live
104
+
105
+ Workflows are discovered automatically from your project and your user-global config, so anything committed to the repo is available to the whole team:
106
+
107
+ - `<project>/.coda/workflows/` — project-specific (commit these to share them).
108
+ - `<project>/.claude/workflows/` — Claude Code-compatible project location, also discovered.
109
+ - `~/.coda/workflows/` and `~/.claude/workflows/` — personal, available in every project.
110
+ - Plugins may also bundle their own workflows.
111
+
112
+ CODA discovers `.ts`, `.mts`, `.js`, and `.mjs` files in these directories (`.d.ts` declaration files are ignored).
113
+
114
+ ## What a run produces
115
+
116
+ A workflow doesn't just print a wall of text. As it runs it typically:
117
+
118
+ - **Fans out** the work across agents (one per file, module, or ticket) and runs them up to a concurrency cap derived from available CPU cores (capped at 16).
119
+ - **Synthesizes** their results — often into one or more **artifacts** written to disk (a report, a JSON summary, a translated doc).
120
+ - **Reports back** on a later turn with a short overview and links to any artifacts it wrote, so you can open them when you're ready.
121
+
122
+ Because each step is a real agent run, you can watch the individual agents in the `/workflows` dashboard and open their transcripts, exactly like standalone [agents](#agents).
123
+
124
+ ## When a workflow is worth it
125
+
126
+ Workflows pay off when **coverage and confidence** matter more than latency:
127
+
128
+ - A **repo-wide audit** — check every package for a class of bug.
129
+ - **Review every file** in a large changeset, then cross-check the findings.
130
+ - A **sweep** that applies the same treatment to many items (translate every doc, add a header to every file).
131
+ - A **loop** that keeps going until a budget, a count, or "no new results" is reached.
132
+
133
+ For a single fact, a one-file edit, or a few tightly-coupled steps, skip the workflow — a single [agent](#agents) or inline work is cheaper and faster.
134
+
135
+ ## Good to know
136
+
137
+ - **No enable/disable setting.** Unlike skills or MCP servers, there's no toggle — a workflow is available as soon as its file is discovered.
138
+ - **Background by design.** Because runs are non-blocking and report back on a later turn, you can keep working (or start another run) while one is in flight.
139
+ - **Built on agents.** Every step a workflow runs is a normal agent run, so the same model, concurrency, and approval rules apply.
140
+ - **Token-aware.** A wide fan-out can spin up many agent runs at once — keep an eye on scale for large sweeps.
141
+
142
+ ## See also
143
+
144
+ - [Agents](#agents) — the single-task delegation that workflows orchestrate.
145
+ - [Extend CODA](#guide-extend) — skills, extensions, plugins, and MCP.
146
+ - [Tools Reference](#tools-reference) — the `run_agent` family and the rest of CODA's tools.