@globant/coda-windows-x64 1.3.0 → 1.4.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.
@@ -23,7 +23,7 @@ The rest of this page is a **reference** for when you want to understand what CO
23
23
 
24
24
  An extension is a TypeScript file that exports an `activate` (or `default`) function receiving the `ExtensionAPI`. It lives in `.coda/extensions/` (project) or `~/.coda/extensions/` (global) — no configuration needed.
25
25
 
26
- ```typescript
26
+ ```ts
27
27
  import { z, type ExtensionAPI, type AgentTool, type ToolContext } from "@globant/coda-core";
28
28
 
29
29
  export default function activate(api: ExtensionAPI): void {
@@ -41,16 +41,16 @@ Extensions are auto-discovered, highest priority first:
41
41
  | --- | --- | --- |
42
42
  | 1 | `.coda/extensions/*.ts` | Project-level (highest) |
43
43
  | 2 | `~/.coda/extensions/*.ts` | User-global |
44
- | 3 | `config.json` → `extensions[]` | Configured paths |
45
- | 4 | `-e ./path.ts` | CLI flag |
44
+ | 3 | `config.json` → `extensions[]`, including any `-e ./path.ts` values merged by the CLI | Configured or one-run paths |
45
+ | 4 | Enabled plugin extension directories | Plugin-provided |
46
46
 
47
- Subdirectory extensions are also discovered. For a folder, CODA resolves the entry file in this order: `package.json` `coda.extensions` → `package.json` `main` → `main.ts` → `<folder-name>.ts` → `index.ts` / `index.js`. To see what's loaded, run `/extensions` inside CODA.
47
+ Duplicate resolved paths are loaded once, preserving the first source in this order. Within the combined `extensions[]` list, configured paths appear before `-e` paths. Subdirectory extensions are also discovered. For a folder, CODA resolves the entry file in this order: `package.json` `coda.extensions` → `package.json` `main` → `main.ts` → `<folder-name>.ts` → `index.ts` / `index.js`. To see what's loaded, run `/extensions` inside CODA.
48
48
 
49
49
  ## Registering a tool
50
50
 
51
51
  Tools are functions the agent can call. Use Zod for the parameter schema.
52
52
 
53
- ```typescript
53
+ ```ts
54
54
  const myTool: AgentTool<MyParams, string> = {
55
55
  name: "my_tool",
56
56
  description: "Clear description of what the tool does and when to use it",
@@ -88,7 +88,7 @@ Inside `execute`, the `ToolContext` gives you what you need:
88
88
 
89
89
  Commands are invoked by the user as `/name args`.
90
90
 
91
- ```typescript
91
+ ```ts
92
92
  api.registerCommand("deploy", {
93
93
  description: "Deploy the application to staging or production",
94
94
  getArgumentCompletions: (prefix) => {
@@ -136,15 +136,15 @@ The handler context (`ExtensionCommandContext`) lets you drive the session:
136
136
 
137
137
  ```text
138
138
  model, models, clear, compact, exit, help, mcp, providers, settings,
139
- skills, agents, extensions, plugin, plugins, reload-plugins,
140
- init, timeline, rewind, checkpoint-status
139
+ skills, agents, extensions, plugin, plugins, reload-plugins, usage,
140
+ permissions, init, timeline, rewind, checkpoint-status
141
141
  ```
142
142
 
143
143
  ## Subscribing to lifecycle hooks
144
144
 
145
145
  Hooks let you react to (or modify) what CODA does at key moments.
146
146
 
147
- ```typescript
147
+ ```ts
148
148
  api.on("session_start", async ({ sessionId }) => {
149
149
  console.error("Session started:", sessionId);
150
150
  });
@@ -169,20 +169,15 @@ api.on("context", async (context) => {
169
169
  | `tool_result` | `ToolResultEvent` | Modify a tool result |
170
170
  | `session_before_compact` | — | Before compaction (return `{ cancel: true }` to cancel) |
171
171
  | `session_compact` | — | After compaction completes |
172
- | `session_before_switch` | `{ sessionId }` | Before switching to a different session |
173
- | `session_switch` | `{ sessionId }` | After a session switch completes |
174
172
  | `session_before_fork` | `{ entryId }` | Before forking from a timeline entry |
175
173
  | `session_fork` | `{ sessionId }` | After a fork completes |
176
- | `session_before_tree` | — | Before the session tree is traversed |
177
- | `session_tree` | — | After the session tree traversal |
178
- | `message_start` | `MessageEvent` | When a new message begins streaming |
179
174
  | `message_update` | `MessageEvent` | On each incremental message update |
180
- | `message_end` | `MessageEvent` | When a message finishes streaming |
181
175
  | `tool_execution_start` | `ToolExecutionEvent` | When a tool starts executing |
182
176
  | `tool_execution_update` | `ToolExecutionEvent` | On tool execution progress update |
183
177
  | `tool_execution_end` | `ToolExecutionEvent` | When a tool finishes executing |
184
- | `resources_discover` | | When CODA discovers extension resources |
185
- | `user_bash` | `UserBashEvent` | When the user runs a shell command via the bash tool |
178
+ | `resources_discover` | `{ cwd, reason }` | At session start. Returned resource paths are currently diagnostic only. |
179
+
180
+ The API type also reserves `session_before_switch`, `session_switch`, `session_before_tree`, `session_tree`, `message_start`, `message_end`, and `user_bash`, but the current CLI/runtime does not emit them. Do not depend on those names until they are wired.
186
181
 
187
182
  > **`context` hook — important invariant:** The `context` payload also contains a `messageIds` field — a parallel array to `messages` where `messageIds[i]` is the DB row id for `messages[i]` (or `null` for synthetic messages). The invariant `messages.length === messageIds.length` is load-bearing. If your hook appends, inserts, or reorders `payload.messages`, you **must** apply the same operation to `payload.messageIds`, pushing `null` for synthetic entries.
188
183
 
@@ -190,23 +185,25 @@ The `input` hook returns one of three actions to control the message: `{ action:
190
185
 
191
186
  ## Intercepting tool calls
192
187
 
193
- Use the `tool_call` hook to block dangerous commands or rewrite inputs before they run:
188
+ Use the `tool_call` hook to return an authorization decision or rewrite the input before policy is evaluated:
194
189
 
195
- ```typescript
190
+ ```ts
196
191
  api.on("tool_call", async ({ toolName, input }) => {
197
- if (toolName === "bash" && input.command?.includes("rm -rf /")) {
198
- return { deny: true, reason: "Blocked destructive command" };
192
+ if (toolName === "bash" && input.command?.startsWith("deploy ")) {
193
+ return { decision: "ask", reason: "Confirm deployment command" };
199
194
  }
200
195
  });
201
196
  ```
202
197
 
203
- The hook can return `{ deny: true, reason }` to cancel the call with an error, or `{ block: true, reason }` to pause it and wait for explicit user approval before proceeding. Returning nothing (or `undefined`) lets the call proceed normally.
198
+ Return `decision: "allow"`, `"ask"`, or `"deny"`, with an optional `reason`. You can also return `updatedInput`; CODA sends that rewritten input back through the authorization engine before execution. Returning nothing lets normal policy decide.
199
+
200
+ > **Migrating an older extension:** legacy `{ deny: true }` and `{ block: true }` responses are still accepted, but both now mean `deny`. If you previously used `{ block: true }` to ask the user, return `{ decision: "ask" }` instead.
204
201
 
205
202
  ## Registering shortcuts, providers, and flags
206
203
 
207
204
  Beyond tools, commands, and hooks, an extension can register a few other surfaces (all optional):
208
205
 
209
- ```typescript
206
+ ```ts
210
207
  // A keyboard shortcut (CLI only). Pick a key that isn't reserved (see below).
211
208
  api.registerShortcut?.("ctrl+k", {
212
209
  description: "Run my action",
@@ -237,20 +234,20 @@ api.registerMessageRenderer?.("my-custom-type", (entry) => {
237
234
  });
238
235
  ```
239
236
 
240
- **Reserved shortcuts** — extensions can't override these: `escape`, `ctrl+b`, `ctrl+c`, `ctrl+g`, `ctrl+l`, `ctrl+o`, `ctrl+u`, `ctrl+d`, `ctrl+up`, `ctrl+down`, `ctrl+j`, `ctrl+shift+c`.
237
+ **Reserved shortcuts** — extensions can't override these: `escape`, `ctrl+b`, `ctrl+c`, `ctrl+g`, `ctrl+l`, `ctrl+o`, `ctrl+u`, `ctrl+d`, `ctrl+up`, `ctrl+down`, `ctrl+j`, `ctrl+p`, `ctrl+shift+c`. `Ctrl+Up` / `Ctrl+Down` scroll the transcript; `Ctrl+U` / `Ctrl+D` remain reserved for conventional input behavior rather than scrolling.
241
238
 
242
239
  ## Loading, testing, and reloading
243
240
 
244
241
  - **Drop-in load.** Save your `.ts` file under `.coda/extensions/` (project) or `~/.coda/extensions/` (global) and CODA picks it up on the next launch — no registration step.
245
242
  - **Verify it loaded.** Run `/extensions list` inside CODA to confirm your extension is active and see the tools and commands it registered; `/extensions guide` prints API help.
246
- - **Iterate quickly.** If your extension is bundled with plugins, `/reload-plugins` re-reads them after you change the files on disk. Otherwise, relaunch CODA to reload a standalone extension file.
243
+ - **Iterate quickly.** If your extension is bundled with a plugin, `/reload-plugins` starts a fresh session with plugins reloaded. Restart the CLI after changing a standalone extension file.
247
244
  - **Try one for a single run.** Pass `-e ./path/to/extension.ts` on the command line to load an extra extension just for that session — useful while developing.
248
245
 
249
246
  ## Tips for good extensions
250
247
 
251
248
  - **Write tool descriptions for the model, not the user.** Lead with a CAPS category, say *when* to pick this tool over alternatives, and include a short parameter example. CODA chooses tools from these descriptions.
252
249
  - **Respect cancellation.** Honor `context.signal` in long-running tool work so **Esc** can interrupt cleanly.
253
- - **Ask before doing harm.** Route risky actions through `context.hitl` so they go through the same approval flow as built-in tools.
250
+ - **Let policy own general tool safety.** Extension tools pass through the same authorization engine as built-ins. Use a `tool_call` decision for policy-like `ask` or `deny` behavior. Use `context.hitl.requestAnswer(...)` when the tool genuinely needs a user choice—such as selecting a deployment target—and `context.hitl.requestApproval(...)` only for a separate, tool-specific confirmation that policy cannot express.
254
251
  - **Use `context.operations`** for file and shell access instead of importing Node APIs directly — it's the supported, sandbox-aware path.
255
252
 
256
253
  ## See also
@@ -61,11 +61,11 @@ Use `coda --lastsession` to resume the most recent session. For a specific sessi
61
61
 
62
62
  ### What does the context percentage in the status bar mean?
63
63
 
64
- It shows how full the current conversation context is. When it approaches 100%, CODA automatically compacts the session history. If you're seeing degraded quality near 100%, run `/compact` manually or start a `/new` session.
64
+ It shows how full the current conversation context is. CODA starts automatic reduction before the window is exhausted: stale tool output can move aside first, and older history is summarized at the configured threshold. If quality feels degraded, run `/compact` manually or start a `/new` session.
65
65
 
66
66
  ### CODA seems to have "forgotten" something from earlier in the session. Why?
67
67
 
68
- Automatic compaction condenses older messages into a summary to keep the session running. If you need full history for debugging, open `/settings` → **Context Compaction** to disable it or adjust when it kicks in.
68
+ Automatic reduction may move stale tool output out of the active context and condense older messages into a summary. The original transcript remains stored, but the model works from the reduced view. If you need a less aggressive model-visible context while debugging, open `/settings` → **Context Compaction** to disable automatic reduction or adjust the threshold.
69
69
 
70
70
  ## Making changes
71
71
 
@@ -77,7 +77,7 @@ Type `/timeline` (or `/rewind`, or press **Esc** twice) to see all snapshots fro
77
77
 
78
78
  CODA runs an **authorization engine** that decides `allow` / `ask` / `deny` for every tool call. Two levers control it:
79
79
 
80
- - **Permission mode** — press `Ctrl+P` to cycle the session's mode: **read-only** (only reads run; writes and commands are refused), **default** (reads run, risky actions like `git commit` ask first, destructive ones are denied unless you add an allow rule), and **auto** (risky actions auto-run for unattended/CI use; only catastrophic ones stay blocked). Set the default in `/settings` or per project in `.coda/config.json` via `permissions.defaultMode`.
80
+ - **Permission mode** — press `Ctrl+P` to cycle the session's mode: **read-only** (only reads run; writes and commands are refused), **default** (reads run, risky actions like `git commit` ask first, destructive ones are denied unless you add an allow rule), and **auto** (risky actions auto-run for unattended/CI use; only catastrophic ones stay blocked). Set your default in `~/.coda/config.json` via `permissions.defaultMode`; a project config can tighten but cannot raise it.
81
81
  - **Rules** — to always allow or always block a specific command, add `allow` / `ask` / `deny` rules under `permissions` in `config.json` (e.g. `allow Bash(git status)` or `deny Bash(rm:*)`). **Deny always wins**, and a handful of catastrophic actions (`rm -rf /`, `sudo`, a fork bomb) sit behind an un-relaxable floor that no allow rule can override.
82
82
 
83
83
  The legacy `bash.autoApproveLevel` ("safe"→"high") was replaced by this model; a stored `high` migrates to `auto`.
@@ -100,7 +100,7 @@ Some editors capture `Ctrl+P` before CODA sees it. On **Windows/Linux**, VS Code
100
100
 
101
101
  ### What is AGENTS.md and should I have one?
102
102
 
103
- It's optional, but recommended — especially for shared projects. It's a Markdown file at your project root that CODA reads at the start of every session, where you document your coding conventions, how to run tests, what files not to touch, etc. Generate one with `/init` (or write it by hand), customize it, and commit it to Git so the whole team benefits.
103
+ It's optional, but recommended — especially for shared projects. Put `AGENTS.md` in the directory where you launch CODA to document coding conventions, test commands, and files not to touch. CODA also accepts `AGENT.md` or `CLAUDE.md` as fallback names. Generate `AGENTS.md` with `/init` (or write it by hand), customize it, and commit it so the whole team benefits.
104
104
 
105
105
  ## Extensions and tools
106
106
 
@@ -130,7 +130,7 @@ Open `/workflows` and press **`c`** on a running entry, or run `/workflows stop
130
130
 
131
131
  ### How do I install a plugin or browse the marketplace?
132
132
 
133
- From inside CODA, open the `/plugin` manager to install, enable, disable, and browse the marketplace. From your terminal, `coda plugin install <source>` works too, where `<source>` is an npm package (prefix `npm:`), a Git/HTTPS URL, a local directory path, a `.zip` archive, or a `file://…` URL. CODA is compatible with the Claude Code plugin ecosystem. To browse a marketplace catalog, first register one with `coda marketplace install <source>`; then `/plugin` lists available plugins from that catalog. See [Extend CODA](#guide-extend).
133
+ From inside CODA, open the `/plugin` manager to install, enable, disable, and browse the marketplace. From your terminal, `coda plugin install <source>` works too, where `<source>` is an npm package (prefix `npm:`), a Git/HTTPS URL, a local directory path, a `.zip` archive, or a `file://…` URL. CODA recognizes native CODA plugins plus Claude Code, Cursor, and portable Agent Plugins layouts. To browse a marketplace catalog, first register one with `coda marketplace install <source>`; then `/plugin` lists available plugins from that catalog. See [Extend CODA](#guide-extend).
134
134
 
135
135
  ## Models and cost
136
136
 
@@ -147,6 +147,16 @@ CODA re-checks your configured model against the provider's live catalog at star
147
147
 
148
148
  To opt out and always be asked, set `"strictPin": true` on the profile (see [Configuration Reference](#config-reference) › "activeProfile and profiles" and "modelResilience"). On a provider without a live catalog (e.g. local Ollama), CODA trusts your id and shows a clear switch-model message if it turns out to be unavailable.
149
149
 
150
+ ### How do I set the reasoning (thinking) effort for a single headless run?
151
+
152
+ Pass `coda --reasoning-effort <level>` (`none|minimal|low|medium|high|xhigh|max`, case-insensitive) alongside your headless prompt:
153
+
154
+ ```bash
155
+ coda -p "explain this repo" --reasoning-effort high
156
+ ```
157
+
158
+ The level is applied **in memory for that run only** — it is never written to `~/.coda/config.json`, and it overrides any persisted `reasoning.effort` just for that invocation. Because nothing is written to disk, you can launch several headless runs **concurrently with different efforts** and they won't race on a shared config file (the reason the flag exists). Subagents spawned during the run inherit the same effort. An invalid value fails fast; a level the active model can't honor prints a stderr warning and runs without applying it (no silent fallback). Interactively, use `/effort` instead. See [Configuration Reference](#config-reference) for the persisted reasoning settings and supported levels.
159
+
150
160
  ### Where do I see token usage and cost?
151
161
 
152
162
  The TUI status bar shows the context fill percentage and running token/cost figures for the session, so you can keep an eye on how much a long session is consuming.
@@ -159,7 +169,7 @@ Everything lives under `~/.coda/` — `config.json`, `.secrets`, the session dat
159
169
 
160
170
  ### How do I view or share logs safely?
161
171
 
162
- Run `coda logs` for the viewer (filter by `--level`, `--service`, `--since`, or `--follow`). To share with support, `coda logs export` writes a redacted, path-scrubbed bundle to `~/.coda/exports/` — nothing is ever uploaded. Secrets are scrubbed before anything hits disk. See [View & Share Logs](#logging).
172
+ Run `coda logs` for the viewer (filter by `--level`, `--service`, `--since`, or `--follow`). To share with support, `coda logs export` writes a redacted, path-scrubbed bundle to `~/.coda/exports/` — nothing is ever uploaded. Review it, then attach it to your request or email **coda-tech-support@globant.com**. Secrets are scrubbed before anything hits disk. See [View & Share Logs](#logging).
163
173
 
164
174
  ### Can I use checkpoints in CI?
165
175
 
@@ -167,7 +177,7 @@ Not for rollback — the `/timeline` picker is a TUI feature. In headless mode c
167
177
 
168
178
  ### How does CODA behave in a monorepo?
169
179
 
170
- It loads exactly one `AGENTS.md` the one in the directory you launch it from. There's no upward walk or merging. Launch from the package you're working in (`cd packages/billing && coda`). See [Collaborate with Your Team](#guide-collaborate).
180
+ At startup, CODA loads an optional global instruction file plus one instruction file from the directory where you launch it (`AGENTS.md`, then `AGENT.md`, then `CLAUDE.md`). It does not inherit parent-directory instructions at startup. When it reads files deeper in the tree, it can attach more-specific instructions from those subdirectories. Launch from the package you're working in (`cd packages/billing && coda`) when that package's rules should be the root conventions. See [Collaborate with Your Team](#guide-collaborate).
171
181
 
172
182
  ## See also
173
183
 
@@ -4,18 +4,18 @@ Quick definitions for terms used throughout the docs.
4
4
 
5
5
  | Term | Definition |
6
6
  | --- | --- |
7
- | **AGENTS.md** | A Markdown file at your project root that CODA reads at the start of every session. Use it to document your project's conventions, quality gates, and constraints for the agent. |
7
+ | **AGENTS.md** | The preferred instruction filename for project conventions, quality gates, and constraints. CODA loads it from the launch directory at startup and can attach more-specific instruction files when reading deeper paths. `AGENT.md` and `CLAUDE.md` are fallback names. |
8
8
  | **Agent** | In CODA, an agent is a Markdown-defined profile that describes a specialist persona. CODA can delegate subtasks to agents, running them in parallel for complex work. |
9
9
  | **Batch mode** | Headless, non-interactive mode. Run with `coda -p "prompt"`. No TUI, no multi-turn conversation — use in scripts and CI. |
10
10
  | **Checkpoint** | A file snapshot taken before each turn — the state from before CODA acts on the message you just sent. Restored via `/timeline` or `/rewind`; your project's Git history is untouched. |
11
11
  | **CLI** | The `coda` command-line tool. It runs in two modes: interactive (the TUI) and headless (batch). |
12
12
  | **coda-help** | A built-in agent that answers questions about how to use CODA by searching the local user guide. CODA delegates to it automatically when you ask about itself. |
13
- | **Compaction** | Automatic condensing of older conversation history to free up context window space. Triggered at a configurable fill threshold. |
13
+ | **Compaction** | Context reduction for long sessions. CODA either stores the current context directly or reduces it by moving stale tool output aside and, at the configured threshold, condensing older messages into a summary. |
14
14
  | **Extension** | A TypeScript module that registers custom tools, slash commands, or lifecycle hooks into CODA. |
15
15
  | **Glob.AI OS** | Globant's internal AI gateway — the primary provider for CODA at Globant. |
16
16
  | **MCP** | Model Context Protocol. A standard for connecting AI models to external tools and services. CODA uses MCP servers to talk to GitHub, databases, CI systems, and other integrations. |
17
17
  | **MEMORY.md** | Durable notes the agent keeps across sessions — preferences, decisions, and gotchas it learns. Unlike AGENTS.md (which you write), CODA maintains this itself, and it survives checkpoint rollbacks. |
18
- | **Plugin** | A versioned, installable package that can bundle skills, agents, extensions, and MCP fragments. More structured than an extension; installable via `coda plugin install`. |
18
+ | **Plugin** | A versioned, installable package that can bundle skills, agents, extensions, MCP fragments, and lifecycle hooks. More structured than an extension; installable via `coda plugin install`. |
19
19
  | **Provider** | The AI backend CODA sends prompts to — for example a Glob.AI OS instance, a local Ollama server, or any OpenAI-compatible endpoint. Managed with `/providers`. |
20
20
  | **Session** | A persistent CODA conversation. Stored on disk; resumable at any time. |
21
21
  | **Skill** | A Markdown file that encodes a repeatable workflow. Invoked with a slash command like `/skill-name`. |
@@ -37,7 +37,7 @@ Quick definitions for terms used throughout the docs.
37
37
  | **`propose_policy`** | The built-in tool CODA uses to suggest a permanent permission change (add rule, remove rule, or change mode) for you to approve. Triggered when you ask in plain English (e.g. "allow pnpm build") or after a denial. On by default; a *widening* change always needs your explicit approval. Disable with `permissions.proposePolicy: false`, `CODA_PROPOSE_POLICY`, or the admin `disableProposePolicy`. |
38
38
  | **Managed policy** | An organization-level policy set by an administrator that overrides and locks certain permission settings in your personal and project configs (e.g. forbidding `auto` mode, restricting MCP servers). A managed `deny` is final. |
39
39
  | **Headless mode** | See *Batch mode*. |
40
- | **Marketplace** | The catalog of installable plugins, reachable from the `/plugin` manager; Claude Code-ecosystem compatible. |
40
+ | **Marketplace** | A catalog of installable plugins, reachable from the `/plugin` manager. CODA recognizes native, Claude Code, Cursor, and portable Agent Plugins layouts. |
41
41
  | **Redaction** | The always-on scrubbing of secret-looking keys and values from logs before they're written to disk. |
42
42
  | **ripgrep / fastgrep** | The two content-search backends behind the `grep` tool. ripgrep ships bundled and is the default. |
43
43
  | **Shadow repository** | The private Git repo where checkpoints are stored, separate from your project's own `.git`. Located at `~/.coda/checkpoints/<hash>/` by default (one per project, keyed by a SHA-256 of the project path). The base directory can be relocated via `CODA_HOME`. |
@@ -10,11 +10,11 @@ In addition to per-turn snapshots, CODA automatically takes an extra snapshot la
10
10
 
11
11
  For how checkpoints work in detail — the shadow repo, Git requirements, and how restoring rewinds the conversation — see [Sessions & Checkpoints](#sessions).
12
12
 
13
- ## Approve commands as they run
13
+ ## Approve actions when CODA asks
14
14
 
15
- When CODA wants to run a shell command, it shows you what it's about to execute and waits for your approval — press **Y** to allow it or **N** to skip it. By default, CODA auto-approves low-risk commands (like `git status` or `cat`) and asks before anything that writes or deletes files.
15
+ Every tool call goes through the authorization engine. It combines your **permission mode** with `allow` / `ask` / `deny` rules and the built-in safety floor. An `allow` decision runs immediately, `deny` does not run, and `ask` opens the approval prompt — press **Y** for this action, **A** for the displayed reusable session rule when offered, or **N** to deny it. Use **Arrow keys + Enter** to select another offered option; a permanent project rule always gets a second confirmation.
16
16
 
17
- How much runs without asking depends on your **permission mode**, which you cycle with **Ctrl+P** or set via `permissions.defaultMode`:
17
+ How much runs without asking depends on your permission mode, which you cycle with **Ctrl+P** or set via `permissions.defaultMode`:
18
18
 
19
19
  | Mode | What it allows |
20
20
  | --- | --- |
@@ -88,7 +88,7 @@ If your project has an `AGENTS.md` with a "quality gate" section, CODA follows i
88
88
  ## A quick mental model for staying in control
89
89
 
90
90
  1. **Checkpoint** — every turn is snapshotted before it runs, so you can always go back.
91
- 2. **Approve** — risky shell commands and unread-file overwrites pause for your **Y**/**N**.
91
+ 2. **Authorize** — rules and the current mode decide each tool call; only `ask` decisions pause for you.
92
92
  3. **Interrupt** — **Esc** stops a turn the instant it heads the wrong way.
93
93
  4. **Steer or queue** — react without stopping the turn (`/settings` → **Composer**).
94
94
  5. **Undo** — `/timeline` (or **Esc Esc**) rewinds files *and* the conversation to a chosen point.
@@ -6,7 +6,7 @@ CODA works best when the whole team uses it consistently. This guide covers how
6
6
 
7
7
  `AGENTS.md` is the most important file for team collaboration. CODA reads it at the start of every session and uses it to understand your project's conventions — coding style, testing approach, which areas to avoid, how to run the quality checks.
8
8
 
9
- CODA looks for it at your project root (`<project>/AGENTS.md`) first, and falls back to `<project>/.coda/AGENTS.md` if the root file isn't present. Put it at the root for visibility, or under `.coda/` if you prefer to keep it out of the top level.
9
+ CODA looks for an instruction file in the directory where you launch it, preferring `AGENTS.md`, then `AGENT.md`, then `CLAUDE.md`. Put project instructions at that root for visibility. A legacy `<project>/.coda/AGENTS.md` is no longer loaded; move it to the project root.
10
10
 
11
11
  Create or update it with `/init` and then edit it to add what CODA missed. A typical `AGENTS.md` looks like this:
12
12
 
@@ -64,13 +64,13 @@ The most valuable things to share live in the repo and apply to everyone who clo
64
64
  A project-level `<project>/.coda/config.json` is also **safe to commit** — it never holds secrets (those live in `~/.coda/.secrets`, which is never committed). But be selective about what you put there:
65
65
 
66
66
  - **Don't commit the active provider.** Which provider you use (a specific Glob.AI OS instance, or a local Ollama) is a personal, machine-specific choice, and provider profiles are defined in each developer's own global config. Pinning it in the repo can break teammates who don't have that profile.
67
- - **Think twice before committing an elevated permission mode.** Setting `permissions.defaultMode: "auto"` in the project's `.coda/config.json` means everyone who clones the repo runs more commands without being asked a safety trade-off your team should agree on first.
67
+ - **Use project permission modes to tighten, not widen.** A project `.coda/config.json` can start sessions in a more restrictive mode, but CODA ignores attempts to raise autonomy above each developer's user-level default. Share explicit rules only when the team agrees on them.
68
68
 
69
69
  In short: share **conventions and workflows**, keep **personal and security preferences** local.
70
70
 
71
71
  ## Working in a monorepo
72
72
 
73
- CODA loads exactly one `AGENTS.md` the one in the directory where you launch it. **For `AGENTS.md` specifically**, there is no upward directory walk and no merging of parent files. (Agent definitions and workflow modules _do_ walk upward to parent directories, so placing them closer to the repo root makes them available to nested package launches automatically.)
73
+ At startup, CODA loads your optional global instruction file from `~/.coda/` and one instruction file from the directory where you launch it, using the `AGENTS.md` `AGENT.md` `CLAUDE.md` fallback order. It does not merge instruction files from parent directories at startup. When CODA later reads a file below that root, it can attach more-specific instruction files found between that file and the launch directory. Agent definitions and workflow modules use their own upward discovery rules.
74
74
 
75
75
  In a monorepo, launch CODA from the package directory you're working in:
76
76
 
@@ -79,7 +79,7 @@ cd packages/billing
79
79
  coda # loads packages/billing/AGENTS.md
80
80
  ```
81
81
 
82
- Put conventions that apply everywhere in each package's `AGENTS.md`, or maintain a root-level one and symlink it into each package.
82
+ Put package-specific conventions in each package's `AGENTS.md`. For repository-wide conventions, launch from the repository root or make the shared rules available from the package launch directory; CODA does not automatically inherit a parent root file at startup.
83
83
 
84
84
  ## Share agents and workflows too
85
85
 
@@ -27,9 +27,9 @@ Everything happens from inside CODA through the `/mcp` manager:
27
27
  /mcp
28
28
  ```
29
29
 
30
- From there you can **add a server** (paste its JSON or import it from a file), edit the global or project `mcp.json`, list configured servers and their connection status, view the tools each one exposes, enable or disable servers for the session, and reload after a change — no need to hand-edit files outside the app.
30
+ From there you can **add a server** (paste its JSON or import it from a file), edit the global or project `mcp.json`, list configured servers and their connection status, view the tools each one exposes, enable or disable servers for the session, and reload after a change — no need to hand-edit files outside the app. You can also ask CODA to configure one from a package, command, repository, or URL; see [Configure an MCP Server](#add-mcp-server-skill).
31
31
 
32
- **Where MCP servers are defined.** Servers live in `mcp.json` files that layer like the rest of your config: `~/.coda/mcp.json` (global) and `<project>/.coda/mcp.json` (project). A third, session-level file at `~/.coda/sessions/<sessionId>/mcp.json` holds per-session overrides — including a disable-only shorthand `{ "disabled": true }` to switch a higher-tier server off for one session. Each server entry is either **stdio** (`command` plus optional `args`/`env`) or **HTTP** (`url`, optional `headers`/token); add `"disabled": true` to any entry to keep it but turn it off. (CODA builds the live server map from `mcp.json` + plugins + `--mcp-config`, so prefer `mcp.json` over the `mcp.servers` block in `config.json`.)
32
+ **Where MCP servers are defined.** Servers live in `mcp.json` files that layer like the rest of your config: `~/.coda/mcp.json` (global) and `<project>/.coda/mcp.json` (project). A third, session-level file at `~/.coda/sessions/<sessionId>/mcp.json` holds per-session overrides — including a disable-only shorthand `{ "disabled": true }` to switch a higher-tier server off for one session. Each project/global server entry is either **stdio** (`command` plus optional `args`/`env`) or **HTTP** (`url`, optional `headers`/token). Use the `/mcp` manager to enable or disable it for the current session. CODA builds the live server map from `mcp.json` + plugins + `--mcp-config`, so prefer `mcp.json` over the `mcp.servers` block in `config.json`.
33
33
 
34
34
  Once a server is connected, CODA can use its tools automatically — you just describe what you want in plain language. For example, with a **GitHub MCP server** connected, you could ask:
35
35
 
@@ -88,7 +88,7 @@ Ready to build one? The easiest way is to ask CODA — its `create-extension` sk
88
88
 
89
89
  ## Share packaged integrations with plugins
90
90
 
91
- Plugins are versioned, installable packages — like extensions, but with a manifest, version number, and the ability to bundle skills, agents, and MCP fragments together. Use plugins when you want to share a reusable CODA integration across teams or projects.
91
+ Plugins are versioned, installable packages — like extensions, but with a manifest, version number, and the ability to bundle skills, agents, extensions, MCP fragments, and lifecycle hooks together. Use plugins when you want to share a reusable CODA integration across teams or projects.
92
92
 
93
93
  Manage plugins from inside CODA with the `/plugin` manager — enable, disable, and browse any registered marketplace catalog. The `/plugin install` slash command accepts **only absolute local paths** to a plugin directory; for npm packages, Git URLs, or marketplace-sourced plugins, use `coda plugin install <source>` from the terminal:
94
94
 
@@ -102,7 +102,7 @@ You can also install from your terminal:
102
102
  coda plugin install <source> [--name <folder>] [--scope global|project]
103
103
  ```
104
104
 
105
- `<source>` can be an npm package (prefix `npm:`), a Git/HTTPS URL, a local directory path, a `.zip` archive, or a `file://…` URL. `--name` selects a subdirectory (useful for monorepo git sources); `--scope` chooses `global` (default) or `project` install scope.
105
+ `<source>` can be an npm package (prefix `npm:`), a Git/HTTPS URL, a local directory path, a `.zip` archive, or a `file://…` URL. `--name` selects a subdirectory (useful for monorepo git sources); `--scope` chooses `global` (default) or `project` install scope. After installing, enabling, or disabling a plugin, run `/reload-plugins`. It starts a fresh session with plugins reloaded.
106
106
 
107
107
  ### Adding a marketplace
108
108
 
@@ -113,7 +113,7 @@ A marketplace is a catalog of plugins. Add one from the terminal with `coda mark
113
113
  - a **local folder** containing a `marketplace.json` (Claude-style `.claude-plugin/` or `.coda-plugin/` layouts are recognized);
114
114
  - a **local `.zip`** archive — CODA unpacks it and finds the catalog inside, including the single nested top-level folder you get from a GitHub "Download ZIP" / "Source code" archive.
115
115
 
116
- CODA is compatible with the Claude Code plugin and marketplace ecosystem, so catalogs published for Claude Code work here.
116
+ CODA recognizes native CODA plugins plus Claude Code, Cursor, and portable Agent Plugins layouts. Features outside CODA's supported component set may be ignored, so review the detected plugin details before enabling it.
117
117
 
118
118
  ## Orchestrate multiple agents with workflows
119
119
 
@@ -10,7 +10,7 @@ The hook system is **compatible with Claude Code hooks**: the same JSON input/ou
10
10
 
11
11
  Add a `hooks` key to `~/.coda/config.json` (global) or `.coda/config.json` (project):
12
12
 
13
- ```jsonc
13
+ ```json
14
14
  {
15
15
  "hooks": {
16
16
  "PreToolUse": [
@@ -186,15 +186,18 @@ The `matcher` field filters which tool names (or session sources) trigger the ho
186
186
 
187
187
  Coda sends a JSON object on **stdin** (command hooks) or as the **POST body** (HTTP hooks). All events include these base fields:
188
188
 
189
- ```jsonc
189
+ ```json
190
190
  {
191
191
  "session_id": "abc123",
192
192
  "transcript_path": "",
193
193
  "cwd": "/home/user/my-project",
194
- "hook_event_name": "PreToolUse"
194
+ "hook_event_name": "PreToolUse",
195
+ "cli_version": "0.4.2"
195
196
  }
196
197
  ```
197
198
 
199
+ `cli_version` is the running Coda version — the value `coda --version` prints — so a hook can attribute what it observes to the exact version that produced it. Command hooks also receive it as the `CODA_VERSION` environment variable (see [Environment variables available to hooks](#environment-variables-available-to-hooks)), which is cheaper than parsing stdin in hot-path hooks.
200
+
198
201
  ### Tool events (`PreToolUse`, `PostToolUse`, `PostToolUseFailure`)
199
202
 
200
203
  ```jsonc
@@ -203,7 +206,8 @@ Coda sends a JSON object on **stdin** (command hooks) or as the **POST body** (H
203
206
  "transcript_path": "",
204
207
  "cwd": "/home/user/my-project",
205
208
  "hook_event_name": "PreToolUse",
206
- "tool_name": "Bash",
209
+ "cli_version": "0.4.2",
210
+ "tool_name": "bash",
207
211
  "tool_input": { "command": "git status", "description": "Check git status" },
208
212
  "tool_use_id": "toolu_01XYZ",
209
213
  // PostToolUse only:
@@ -215,36 +219,39 @@ Coda sends a JSON object on **stdin** (command hooks) or as the **POST body** (H
215
219
 
216
220
  ### `UserPromptSubmit`
217
221
 
218
- ```jsonc
222
+ ```json
219
223
  {
220
224
  "session_id": "abc123",
221
225
  "transcript_path": "",
222
226
  "cwd": "/home/user/my-project",
223
227
  "hook_event_name": "UserPromptSubmit",
228
+ "cli_version": "0.4.2",
224
229
  "prompt": "Refactor the auth module"
225
230
  }
226
231
  ```
227
232
 
228
233
  ### `SessionStart`
229
234
 
230
- ```jsonc
235
+ ```json
231
236
  {
232
237
  "session_id": "abc123",
233
238
  "transcript_path": "",
234
239
  "cwd": "/home/user/my-project",
235
240
  "hook_event_name": "SessionStart",
241
+ "cli_version": "0.4.2",
236
242
  "source": "startup"
237
243
  }
238
244
  ```
239
245
 
240
246
  ### `Stop`
241
247
 
242
- ```jsonc
248
+ ```json
243
249
  {
244
250
  "session_id": "abc123",
245
251
  "transcript_path": "",
246
252
  "cwd": "/home/user/my-project",
247
253
  "hook_event_name": "Stop",
254
+ "cli_version": "0.4.2",
248
255
  "stop_reason": "turn_complete"
249
256
  }
250
257
  ```
@@ -385,7 +392,7 @@ rule ::= toolName | toolName(content)
385
392
  | File glob | `"Edit(src/*.ts)"` | TypeScript files under `src/` |
386
393
  | Prefix (legacy) | `"Bash(npm:*)"` | `npm`, `npm install`, `npm run …` |
387
394
 
388
- ```jsonc
395
+ ```json
389
396
  {
390
397
  "hooks": {
391
398
  "PreToolUse": [
@@ -444,29 +451,17 @@ Plugins can ship a `hooks/hooks.json` file at the plugin root. The format is ide
444
451
 
445
452
  ## Session environment files (`CODA_ENV_FILE`)
446
453
 
447
- Hooks can export environment variables that persist across all subsequent Bash tool commands in the session.
448
-
449
- ### Mode 1 — External env file (process-level)
450
-
451
- Set `CODA_ENV_FILE` in your shell before launching Coda. Its contents are prepended to every Bash command:
452
-
453
- ```bash
454
- export CODA_ENV_FILE=~/.coda/my-env.sh
455
- coda
456
- ```
457
-
458
- ### Mode 2 — Hook-writable env file (hook-level)
454
+ The hook runtime can give `SessionStart` hooks a writable `CODA_ENV_FILE`, and embedders can use the session-environment API to prepend those exports to later Bash commands. The current CODA CLI does **not** connect that optional callback to its Bash tool, so these files do not currently change later CLI commands. Treat this as an embedding API rather than a CLI feature.
459
455
 
460
- For `SessionStart` hooks (bash/wsl only), Coda sets `CODA_ENV_FILE` to a writable path before spawning your hook. Write `export` statements to that file; they are sourced before every subsequent Bash command in the session:
456
+ A `SessionStart` hook may still write the file for a host that supports it:
461
457
 
462
458
  ```bash
463
459
  #!/bin/bash
464
- # SessionStart hook — activate a Python venv for the whole session
465
- source .venv/bin/activate
466
- echo "export VIRTUAL_ENV=$VIRTUAL_ENV" >> "$CODA_ENV_FILE"
467
- echo "export PATH=$PATH" >> "$CODA_ENV_FILE"
460
+ echo "export VIRTUAL_ENV=$PWD/.venv" >> "$CODA_ENV_FILE"
468
461
  ```
469
462
 
463
+ Do not rely on this for the standard CLI today; configure the environment before launching CODA instead.
464
+
470
465
  ---
471
466
 
472
467
  ## Async hooks
@@ -475,9 +470,9 @@ By default hooks run **synchronously** — the lifecycle event waits for every m
475
470
 
476
471
  ### `async: true` — tracked background
477
472
 
478
- The hook runs in the background. Results are polled at the start of each turn and applied (e.g. `additionalContext` is injected into the next tool result).
473
+ The hook runs in the background. Results are polled at the start of each turn. Completed `additionalContext` is injected into the conversation as an `[Async hook]` user message before that turn proceeds.
479
474
 
480
- ```jsonc
475
+ ```json
481
476
  {
482
477
  "type": "command",
483
478
  "command": ".coda/hooks/slow-analysis.sh",
@@ -490,7 +485,7 @@ The hook runs in the background. Results are polled at the start of each turn an
490
485
 
491
486
  The hook runs fully detached. If it exits with code 2, its stderr/stdout is injected as a system message that re-engages the model. Useful for background file watchers or integrity checkers.
492
487
 
493
- ```jsonc
488
+ ```json
494
489
  {
495
490
  "type": "command",
496
491
  "command": ".coda/hooks/file-integrity-watcher.sh",
@@ -508,7 +503,7 @@ A hook can decide at runtime to go async by printing `{"async": true}` as its fi
508
503
 
509
504
  Set `disableAllHooks: true` in `config.json` to disable all hooks globally. Useful in CI environments or when debugging unexpected behavior:
510
505
 
511
- ```jsonc
506
+ ```json
512
507
  {
513
508
  "disableAllHooks": true
514
509
  }
@@ -531,8 +526,9 @@ Set `disableAllHooks: true` in `config.json` to disable all hooks globally. Usef
531
526
  | Variable | Value |
532
527
  | --- | --- |
533
528
  | `CODA_PROJECT_DIR` | Current project directory |
529
+ | `CODA_VERSION` | The running Coda version (what `coda --version` prints) — same value as the `cli_version` payload field. Set by Coda and authoritative: it overrides any `CODA_VERSION` you exported, and is absent (not empty) when the running version is unknown |
534
530
  | `CODA_PLUGIN_ROOT` | Plugin installation directory (plugin hooks only) |
535
- | `CODA_ENV_FILE` | Writable env file path (SessionStart hooks only, bash/wsl) |
531
+ | `CODA_ENV_FILE` | Writable env file path for `SessionStart` hooks. It affects later Bash calls only in an embedding that wires session-environment support; the standard CLI currently does not. |
536
532
 
537
533
  All other environment variables from the Coda process are also inherited.
538
534
 
@@ -561,7 +557,7 @@ All other environment variables from the Coda process are also inherited.
561
557
 
562
558
  ### Block `git push` in a project
563
559
 
564
- ```jsonc
560
+ ```json
565
561
  {
566
562
  "hooks": {
567
563
  "PreToolUse": [
@@ -602,7 +598,7 @@ All other environment variables from the Coda process are also inherited.
602
598
 
603
599
  ### Log every session to a file
604
600
 
605
- ```jsonc
601
+ ```json
606
602
  {
607
603
  "hooks": {
608
604
  "SessionStart": [
@@ -642,38 +638,6 @@ All other environment variables from the Coda process are also inherited.
642
638
  }
643
639
  ```
644
640
 
645
- ### Activate a Python venv for the whole session
646
-
647
- ```bash
648
- #!/bin/bash
649
- # .coda/hooks/activate-venv.sh
650
- # Used as a SessionStart hook
651
- if [ -f ".venv/bin/activate" ]; then
652
- source .venv/bin/activate
653
- echo "export VIRTUAL_ENV=\"$VIRTUAL_ENV\"" >> "$CODA_ENV_FILE"
654
- echo "export PATH=\"$PATH\"" >> "$CODA_ENV_FILE"
655
- fi
656
- ```
657
-
658
- ```jsonc
659
- {
660
- "hooks": {
661
- "SessionStart": [
662
- {
663
- "hooks": [
664
- {
665
- "type": "command",
666
- "command": ".coda/hooks/activate-venv.sh"
667
- }
668
- ]
669
- }
670
- ]
671
- }
672
- }
673
- ```
674
-
675
- ---
676
-
677
641
  ## Troubleshooting
678
642
 
679
643
  **Hooks are not running**
@@ -698,7 +662,7 @@ fi
698
662
 
699
663
  ## See also
700
664
 
701
- - [Configuration](configuration.md) — where `config.json` files live and how they merge
702
- - [Features](features.md) — plugins, extensions, agents, skills
703
- - [How to create a Coda extension](create-extension.md) — programmatic hooks via the extension API
704
- - [Coda tools overview](tools.md) — tool names to use in `matcher` patterns
665
+ - [Configuration](#configuration) — where `config.json` files live and how they merge.
666
+ - [Extend CODA](#guide-extend) — plugins, extensions, agents, skills, and MCP.
667
+ - [Writing Extensions](#extensions) — programmatic lifecycle hooks and tool interception.
668
+ - [Tools Reference](#tools-reference) — built-in tool names used in matcher patterns.