@globant/coda-windows-x64-baseline 1.3.0 → 1.5.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 (49) hide show
  1. package/assets/agents/coda-help.md +25 -12
  2. package/assets/agents/council.md +11 -0
  3. package/assets/agents/reviewer.md +14 -0
  4. package/assets/agents/side.md +15 -0
  5. package/assets/docs/add-mcp-server-skill.md +137 -0
  6. package/assets/docs/agents.md +1 -1
  7. package/assets/docs/cli-reference.md +40 -4
  8. package/assets/docs/cli-vs-batch.md +2 -0
  9. package/assets/docs/config-json.md +71 -57
  10. package/assets/docs/config-reference.md +99 -48
  11. package/assets/docs/configuration.md +33 -18
  12. package/assets/docs/connect-provider.md +34 -31
  13. package/assets/docs/extensions.md +25 -28
  14. package/assets/docs/faq.md +47 -15
  15. package/assets/docs/glossary.md +8 -8
  16. package/assets/docs/guide-automate.md +6 -2
  17. package/assets/docs/guide-changes.md +4 -4
  18. package/assets/docs/guide-collaborate.md +8 -8
  19. package/assets/docs/guide-extend.md +32 -5
  20. package/assets/docs/hooks.md +33 -69
  21. package/assets/docs/how-it-works.md +3 -3
  22. package/assets/docs/index.md +8 -7
  23. package/assets/docs/installation.md +9 -9
  24. package/assets/docs/logging.md +1 -1
  25. package/assets/docs/overview.md +9 -8
  26. package/assets/docs/permissions.md +35 -16
  27. package/assets/docs/quickstart.md +9 -5
  28. package/assets/docs/sessions.md +6 -2
  29. package/assets/docs/shortcuts.md +53 -3
  30. package/assets/docs/tools-reference.md +21 -10
  31. package/assets/docs/workflows.md +2 -1
  32. package/assets/output-styles/attention-kind.md +50 -0
  33. package/assets/output-styles/concise.md +46 -0
  34. package/assets/output-styles/default.md +4 -0
  35. package/assets/output-styles/explanatory.md +84 -0
  36. package/assets/output-styles/learning.md +103 -0
  37. package/assets/output-styles/plain.md +39 -0
  38. package/assets/output-styles/proactive.md +52 -0
  39. package/assets/output-styles/rundown.md +23 -0
  40. package/assets/output-styles/spartan.md +26 -0
  41. package/assets/output-styles/visual.md +96 -0
  42. package/assets/skills/configure-mcp/SKILL.md +281 -0
  43. package/assets/skills/create-hook/SKILL.md +5 -5
  44. package/assets/skills/init-rules/SKILL.md +78 -26
  45. package/coda.exe +2 -2
  46. package/lib/keytar/build/Release/keytar.node +0 -0
  47. package/lib/opentui/parser.worker.js +15 -14
  48. package/lib/ripgrep/rg.exe +0 -0
  49. package/package.json +1 -1
@@ -4,12 +4,9 @@ CODA is configured from within the tool itself — you normally don't edit files
4
4
 
5
5
  ## Connect a provider
6
6
 
7
- You don't need to run any command to get your first provider. The very first time you launch CODA, a setup wizard appears automatically and walks you through it:
7
+ You don't need to run any command to get your first provider. The very first time you launch CODA, it creates a profile for the default Glob.AI instance (SaaS Europe, unless your install command chose another), names it, and asks you for one credential — a browser sign-in, or an API key for a key-only instance. No setup screen comes before it.
8
8
 
9
- - **Pick a Glob.AI OS environment** — Clients, Corp, SaaS Europe, and so on.
10
- - **Choose how to authenticate** — **OAuth (recommended)**, which signs you in through your browser, or an **API key**.
11
-
12
- For a step-by-step walkthrough of that flow — including OAuth vs API key and custom providers — see [Connect a Provider](#connect-provider). API keys are stored in `~/.coda/.secrets`, separate from config and never committed to Git.
9
+ For what that first run does, how to pick another instance, and how custom providers are set up — see [Connect a Provider](#connect-provider). API keys are stored in your system keychain (or an encrypted secrets file), separate from config and never committed to Git.
13
10
 
14
11
  To **add another provider or edit an existing one** later, open the wizard again from inside CODA:
15
12
 
@@ -21,21 +18,21 @@ The same wizard is available from your terminal with `coda --reconfigure`.
21
18
 
22
19
  ## Switch between providers
23
20
 
24
- If you've set up more than one provider (say, two Glob.AI OS instances, or a local Ollama for testing), switch between them right from the UI with `/providers` — no config files to edit.
21
+ If you've set up more than one provider (say, two Glob.AI instances, or a local Ollama for testing), switch between them right from the UI with `/providers` — no config files to edit.
25
22
 
26
23
  ## Where settings live
27
24
 
28
- Settings cascade in priority order — project settings override user settings, and CLI flags override everything:
25
+ Most settings cascade in priority order — project settings override user settings, and CLI flags override everything. Permission rules accumulate across scopes, and project config cannot raise the starting permission mode:
29
26
 
30
27
  | File | What it's for |
31
28
  | --- | --- |
32
29
  | `~/.coda/config.json` | Your personal defaults — provider, model, theme |
33
- | `~/.coda/.secrets` | API keys and credentials (never commit this) |
30
+ | `~/.coda/.secrets` | Marker file for generic `${VAR}` values (never commit this) — API keys entered via `/providers` live in your system keychain (or an encrypted secrets file); on a host without an OS keyring, legacy keys already present here are left in plaintext rather than migrated |
34
31
  | `<project>/.coda/config.json` | Project-level overrides (safe to commit if no secrets) |
35
32
  | `~/.coda/mcp.json` | MCP servers available in all your projects |
36
33
  | `<project>/.coda/mcp.json` | MCP servers for this project only |
37
34
  | `~/.coda/sessions/<id>/mcp.json` | Per-session MCP overrides (written by `/mcp` commands within a session) |
38
- | `<project>/.coda/.env` or `<project>/.env` | Project-level secrets for `${VAR}` interpolation (merged with `~/.coda/.secrets`) |
35
+ | `<project>/.coda/.env` or `<project>/.env` | Project-level values for `${VAR}` interpolation (merged with `~/.coda/.secrets`). Only the first of the two is read; `.env.local`, `.env.development` and similar files are not loaded, so export those variables in your shell instead |
39
36
 
40
37
  ## Common settings to change
41
38
 
@@ -45,20 +42,38 @@ Some settings can be adjusted from the settings panel. Open it from inside CODA:
45
42
  /settings
46
43
  ```
47
44
 
48
- **Permission mode** — how much CODA runs without asking is set by the session's permission mode: **read-only** (reads only), **default** (asks before risky actions), or **auto** (hands-off). Cycle it with **Ctrl+P**, or set the default with `permissions.defaultMode`. See [Permissions & Approvals](#permissions).
45
+ **Permission mode** — how much CODA runs without asking is set by the session's permission mode: **read-only** (reads only), **default** (asks before risky actions), or **auto** (hands-off). A truly-fresh config (no `permissions` block at all) starts in **auto**; if a `permissions` block already exists but sets no `defaultMode`, sessions start in **default** instead, so an existing partially-configured setup is never silently escalated. A managed policy can still force **default**. Cycle it with **Ctrl+P**, or set the user default with `permissions.defaultMode` in `~/.coda/config.json`. See [Permissions & Approvals](#permissions).
46
+
47
+ > If you have **no allow rules configured** in either your project or global config, CODA offers to run the **`/init-rules`** skill to set up `allow`/`ask`/`deny` rules for auto mode. The Yes/No prompt appears **after your first message** (on the chat screen), not on the home screen. Answer **No** to dismiss it, or set `onboarding.suggestInitRules: false` to never be asked.
49
48
 
50
49
  **Shell** — pick the **shell** CODA uses (`auto`, `bash`, `powershell`, `wsl`, or an explicit path) under **Bash Tool Preferences**. Only shells your host actually has are offered, so you can't select one that won't run (for example, `wsl` doesn't appear off Windows). If a *configured* shell isn't available on this host — say a `config.json` synced from Windows that asks for `wsl` on macOS — CODA neither fails to start nor silently runs a different shell: it falls back to a working shell and shows a banner naming what it's running instead and why, with a pointer to change it. The banner clears the moment you pick a shell that works. Press **Enter** to confirm and close, **Esc** to step back to the menu.
51
50
 
52
- **Compaction** — to keep context fresh, CODA can automatically condense older conversation before it runs out of room. Tune it under **Context Compaction**:
51
+ **Compaction** — to keep context fresh, CODA checks before each model call whether the conversation still fits. When reduction is needed, it can first move stale tool output aside and later condense older conversation at the configured threshold. Tune it under **Context Compaction**:
53
52
 
54
53
  - **Scope** — apply your changes globally or to the current project (project overrides global).
55
- - **Enable / disable** — turn automatic compaction on or off. With it off, you can still compact on demand with `/compact`.
56
- - **Threshold** — how full the context can get (as a percentage) before CODA condenses.
54
+ - **Enable / disable** — turn automatic reduction on or off. With it off, you can still compact on demand with `/compact`.
55
+ - **Threshold** — how full the context can get before summary condensation begins. Large, stale tool output can start moving aside at **65%** of the conversation budget (or at your lower condensation threshold).
57
56
  - **Retain fraction** — how much of the most recent conversation is kept intact when condensing; older messages are summarized.
58
57
 
59
58
  **Chat input** — choose what happens when you send a message while CODA is already working: **Queue message** waits until the current turn finishes (default), while **Steer message** sends your message as the next input to guide the active flow. In `/settings`, this appears under **Composer**. See [Make Changes Safely](#guide-changes) for details.
60
59
 
61
- **Theme** — switch the look of the UI between `classic` and `modern` under **UI Theme**.
60
+ **Theme** — switch the look of the UI under **UI Theme**: `classic` and `modern` (dark), `light`, `solarized`, `nord` and `high-contrast` (black/white with saturated accents, for low-vision setups). Also settable with `"theme": "<name>"` in `config.json`.
61
+
62
+ **Autonomy** — tune `/goal` and `/loop`, including goal judging and loop duration limits. Both commands are **on by default**: rather than making you enable them, CODA warns you before each autonomous run that unattended turns can consume tokens quickly, and every warning lets you choose "don't show this again" (saved per command — silencing `/goal` leaves `/loop`'s warning on). Set `"autonomy": { "enabled": false }` to turn the commands off entirely.
63
+
64
+ **Format after every edit** — run `coda hooks install-format` in a project to add a `PostToolUse` hook that formats/lints each file CODA writes or edits with the project's own formatter (biome, prettier, ruff, gofmt, rustfmt — detected from the config files) and feeds any problems back to the model, which fixes them before moving on. It is a plain hook entry in `.coda/config.json`, so you can edit or remove it like any other.
65
+
66
+ **Git auto-commit** — with `"git": { "autoCommit": true }` every completed turn that changed files ends with a commit of exactly those files, titled `coda: <your prompt>` (`autoCommitPrefix` changes the prefix). Step-by-step history on top of checkpoints; use `/commit` for an on-demand Conventional Commits message instead.
67
+
68
+ **Notifications** — get a system notification (OSC 9, works in iTerm2, WezTerm, Ghostty, Kitty and Windows Terminal) plus a terminal bell when CODA needs an approval or an answer, or when a long turn finishes. Off by default; enable it in `~/.coda/config.json`:
69
+
70
+ ```json
71
+ { "notifications": { "enabled": true, "bell": true, "onComplete": true, "command": "apprise -b" } }
72
+ ```
73
+
74
+ `command` is optional: it runs for every notification with a JSON payload (`kind`, `title`, `message`, `sessionId`) on stdin, so routing to Slack, Apprise or `say` is one line.
75
+
76
+ **Telemetry** — on an authenticated Glob.AI platform-gateway profile, choose **Off**, **Basic**, or **Full**. Basic sends operational metadata without prompt bodies; Full also permits redacted prompt text. Other provider types keep telemetry off.
62
77
 
63
78
  ## How settings cascade
64
79
 
@@ -66,16 +81,16 @@ When the same key is set in more than one place, the most specific wins. From lo
66
81
 
67
82
  1. **Built-in defaults** — what CODA ships with.
68
83
  2. **`~/.coda/config.json`** — your personal, machine-wide settings.
69
- 3. **`<project>/.coda/config.json`** — project overrides.
84
+ 3. **`<project>/.coda/config.json`** — project overrides, except that a project cannot raise the starting permission mode above your user-level default.
70
85
  4. **CLI flags** — `--model`, `--profile`, `--auto-approve` (headless), and friends, for a single run.
71
86
 
72
- So a project can set the permission mode (`permissions.defaultMode`) for everyone who clones it, and a headless run can override the approval posture with `--auto-approve none|all` — without editing any file.
87
+ A project can make the starting permission mode more restrictive for everyone who clones it, but it cannot silently raise autonomy. For a one-off headless run, `--auto-approve none|all` chooses fail-closed default mode or unattended auto mode without editing a file.
73
88
 
74
89
  ## What's safe to commit
75
90
 
76
91
  - **Commit:** `<project>/.coda/config.json` (no secrets), `<project>/.coda/mcp.json`, `AGENTS.md`, shared skills/agents/workflows.
77
92
  - **Never commit:** `~/.coda/.secrets` (it lives in your home directory, not the repo) and your personal `~/.coda/config.json`.
78
- - **Think twice:** pinning the active `provider` or an elevated `permissions.defaultMode` (e.g. `"auto"`) in a project config affects every teammate — see [Collaborate with Your Team](#guide-collaborate).
93
+ - **Think twice:** pinning the active `provider` or shared permission rules affects teammates. A project `permissions.defaultMode` can tighten their starting mode, but it cannot raise autonomy above their user-level default — see [Collaborate with Your Team](#guide-collaborate).
79
94
 
80
95
  ## A minimal `config.json`
81
96
 
@@ -95,6 +110,6 @@ You rarely write this by hand, but it helps to know the shape:
95
110
 
96
111
  > **Note:** The older `"provider"` key is still accepted for backward compatibility but `activeProfile` + `profiles` is the current mechanism used by the wizard and `/switch-profile`.
97
112
 
98
- API keys are *not* in here — they live in `~/.coda/.secrets` in dotenv format and can be referenced from config with `${VAR}` interpolation.
113
+ API keys are *not* in here — they live in your system keychain (or an encrypted secrets file where there is no keychain), separate from config and never committed to Git. `~/.coda/.secrets` is primarily a marker file and a home for generic `${VAR}` values: any plaintext `CODA_*_API_KEY` lines found in it are moved into the credential store at launch **when a real OS keyring is available**. On keychain-less hosts (headless Linux, CI, Docker, WSL, macOS-over-SSH) migration is skipped and legacy keys stay in `.secrets`, kept at `0600` permissions.
99
114
 
100
115
  See the full [Configuration Reference](#config-reference) for every available option, or [config.json — A Complete Example](#config-json) for one annotated file showing every block in context.
@@ -1,35 +1,37 @@
1
1
  # Connect a Provider
2
2
 
3
- The first time you launch CODA — before you can run a prompt — a setup wizard (titled **CODA setup**) walks you through connecting a **provider**: the AI backend CODA talks to. This page explains each choice so you land on the right one. You can reopen the wizard later — see **Reconfigure** below.
3
+ The first time you launch CODA it asks you for one thing: a credential. It names the Glob.AI instance it will use — **Glob.AI (Europe)** (`eu-v1`) unless an instance was chosen for you at install time — opens your browser to sign in there, and stores the session for you. There is no configuration screen to get through. To use another instance, or a custom, OpenAI-compatible or Ollama **provider** (the AI backend CODA talks to), see below.
4
4
 
5
- ## Step 1 — Choose how to connect
5
+ ## What the first run does
6
6
 
7
- - **Glob.AI OS (Globant environments)** — what most people at Globant want.
8
- - **Custom provider** — an OpenAI-compatible endpoint, or a local [Ollama](https://ollama.com) server.
7
+ 1. **Names the instance.** With no profile on the machine, CODA creates one for the default instance and shows its name on the sign-in dialog. If the install command carried an instance, that is the one it names.
8
+ 2. **Asks for the credential.** For an instance with browser login (`eu-v1`, `clients`) it opens your browser; sign in with your account, and if you have more than one project assigned you'll be asked to **select your organization and project**. For a key-only instance (`corp`, `us-v1`) it shows a single **API key** prompt naming the instance and where to get a key — paste or type the key (the input is hidden) and press **Enter**.
9
+ 3. **That's it.** The profile is written to `~/.coda/config.json` and made active; the session or key lives in your system keychain (or an encrypted secrets file where there is no keychain), never in the config.
9
10
 
10
- ## Step 2 — Pick a Glob.AI OS environment
11
+ If your account lives on a different instance, the sign-in fails there. Run `coda --instance <id>` to use another instance for one run, or `coda configure --instance <id>` to make it your default — CODA names the new profile after the instance, or the next free name (`<id>-2`) when that one is taken. For an instance without browser login (`corp`, `us-v1`) the key comes with the command, because there is no sign-in step to ask for it later: `echo "$KEY" | coda configure --instance us-v1 --api-key-stdin`. `coda --help` lists the accepted ids.
11
12
 
12
- > **Note:** The environment picker (this step) only appears when you launch `coda --globant`. Running plain `coda` skips the picker and defaults directly to **SaaS Europe**.
13
+ ## Choosing an instance yourself
13
14
 
14
- Pick your environment: **Clients**, **Corp** (API key only — no browser OAuth), or **SaaS Europe**.
15
+ - `coda --instance us-v1` runs against the US instance for that run only — nothing on disk changes.
16
+ - `coda configure --instance <id>` creates a profile for that instance and makes it active; for an instance with browser login, the next run asks for its credential there. For a key-only instance the key comes with the command: `echo "$KEY" | coda configure --instance us-v1 --api-key-stdin`.
17
+ - `coda --reconfigure` opens the setup wizard (titled **CODA setup**): pick **Glob.AI (Globant environments)**, then an instance — **Glob.AI (Europe)** (`eu-v1`), **Glob.AI (US)** (`us-v1`, API key only) — then how to authenticate: **Login (OAuth browser)** or **API Key**. The wizard also sets up a custom provider (next section).
15
18
 
16
- ## Step 3 — Authenticate
19
+ The ids earlier releases used, `saas-us` and `saas-europe`, still resolve, to `us-v1` and `eu-v1` respectively. Globant-internal runs (`coda --globant`) are also offered **Glob.AI (Clients)** (`clients`) and **Glob.AI (Corp)** (`corp`, API key only).
17
20
 
18
- - **OAuth (recommended)** — CODA opens your browser, you sign in with your Globant account, and the session is stored for you. No keys to copy or rotate. Back in CODA, if you have more than one project assigned in that environment, you'll be asked to **select your organization and project** so CODA knows which workspace to use.
19
- - **API Key** — paste or type your key (the input is hidden), then press **Enter**. Key-only environments skip straight here.
20
-
21
- API keys are stored in `~/.coda/.secrets`, separate from your config and never committed to Git.
21
+ API keys are stored in your system keychain (or an encrypted secrets file on systems without one), separate from your config and never committed to Git.
22
22
 
23
23
  ## Custom provider
24
24
 
25
25
  If you picked **Custom provider**, choose the type:
26
26
 
27
27
  - **OpenAI-compatible** — enter a profile name, the base URL, and an API key.
28
- - **Ollama** — point CODA at your local server (no API key needed). The default endpoint is `http://127.0.0.1:11434/v1`. For a copy-paste `config.json` example, see [Configuration Reference](#config-reference).
28
+ - **Ollama** — point CODA at your local server (no API key needed). Leave the URL empty for the default, `http://127.0.0.1:11434/v1`; CODA adds the `/v1` path when you leave it out, so `http://127.0.0.1:11434` works too. For a copy-paste `config.json` example, see [Configuration Reference](#config-reference).
29
+
30
+ Custom providers are set up through the wizard (`coda --reconfigure`, or `/providers` inside a session) or with `coda configure` (below); the first run never asks about them.
29
31
 
30
32
  ## Switch between configured providers
31
33
 
32
- Each provider you set up is stored as a named **profile** (in the `profiles` map of `~/.coda/config.json`), and one of them is marked **active** via the top-level `activeProfile` key. The active profile decides which backend — and, for Glob.AI OS, which environment, organization, and project — CODA talks to.
34
+ Each provider you set up is stored as a named **profile** (in the `profiles` map of `~/.coda/config.json`), and one of them is marked **active** via the top-level `activeProfile` key. The active profile decides which backend — and, for Glob.AI, which instance, organization, and project — CODA talks to.
33
35
 
34
36
  Once you have more than one profile configured, switch between them quickly with **`/switch-profile`** (alias **`/sp`**):
35
37
 
@@ -37,13 +39,13 @@ Once you have more than one profile configured, switch between them quickly with
37
39
  /switch-profile # opens the profile picker
38
40
  ```
39
41
 
40
- `/switch-profile` only chooses among profiles you've **already configured** — it doesn't add or edit them. It saves your choice as `activeProfile` and reports `Active profile "…" set — applies on next launch`; the switch takes effect the next time you start CODA (there's no live re-target of the current session).
42
+ `/switch-profile` only chooses among profiles you've **already configured** — it doesn't add or edit them. It saves your choice as `activeProfile`. When the session is idle, the switch applies to it right away and CODA reports `Switched to profile "…"`. While a response is still running, CODA leaves the current session alone, because the switch would change the backend under that response, and reports `Active profile "…" set — applies on next launch`.
41
43
 
42
44
  To **add, edit, or remove** a profile instead of just selecting one, use `/providers` (see [Reconfigure](#reconfigure)).
43
45
 
44
- ## Switching the active Glob.AI OS project
46
+ ## Switching the active Glob.AI project
45
47
 
46
- If you authenticated with OAuth and your account has more than one project in the chosen environment, CODA asks you to select an **organization and project** during setup. To change that selection later without re-running the whole wizard, use `/project` inside a session — it switches the active Glob.AI OS project (OAuth only).
48
+ If you authenticated with OAuth and your account has more than one project on the chosen instance, CODA asks you to select an **organization and project** during setup. To change that selection later without re-running the whole wizard, use `/project` inside a session — it switches the active Glob.AI project (OAuth only).
47
49
 
48
50
  ## Check who you're signed in as
49
51
 
@@ -53,7 +55,7 @@ To confirm the current authentication state from inside a session:
53
55
  /auth-status (alias /whoami)
54
56
  ```
55
57
 
56
- It shows the active provider, environment, and — for OAuth — the signed-in identity and selected project. To sign out of a Glob.AI OS session, run `/logout`.
58
+ It shows the active profile and — for OAuth — the signed-in identity and selected project. To sign out of a Glob.AI session, run `/logout`.
57
59
 
58
60
  ## Non-interactive setup (`coda configure`)
59
61
 
@@ -72,7 +74,7 @@ echo "$API_KEY" | coda configure \
72
74
 
73
75
  # Local Ollama (no API key needed)
74
76
  coda configure \
75
- --provider ollama --base-url http://localhost:11434 \
77
+ --provider ollama --base-url http://127.0.0.1:11434 \
76
78
  --profile-name local
77
79
  ```
78
80
 
@@ -80,33 +82,34 @@ coda configure \
80
82
 
81
83
  | Flag | Purpose |
82
84
  | --- | --- |
83
- | `--profile-name NAME` | Profile ID in `~/.coda/config.json` (required) |
84
- | `--provider PROVIDER` | `glob-ai` \| `openai-compat` \| `ollama` (required) |
85
- | `--instance INSTANCE` | glob-ai only: `clients` \| `corp` \| `saas-europe` (default: `clients`) |
86
- | `--base-url URL` | Required for `openai-compat`; optional for `ollama` |
85
+ | `--profile-name NAME` | Profile ID in `~/.coda/config.json`. Omitted: named after the instance, the endpoint's host, or the provider; when that name is taken, the next free one (`eu-2`). A name you pass that is already taken is refused unless you add `--force`. Required with `--force` |
86
+ | `--provider PROVIDER` | `glob-ai` (the default: any Glob.AI instance) \| `openai-compat` \| `ollama`. Omitted with `--force`: the provider of the profile it overwrites |
87
+ | `--instance INSTANCE` | Any instance `coda configure --help` lists, or a custom name with `--base-url`. Omitted: the active profile's instance, else the declared default |
88
+ | `--base-url URL` | Required for `openai-compat`. For a Glob.AI instance, CODA contacts an endpoint no instance declares to confirm it is a Glob.AI instance before writing anything; if it cannot, nothing is written and the message says what to do next (check the URL, or use `--provider openai-compat` for an endpoint that is not a Glob.AI instance). With a known `--instance` it pins that instance to the endpoint; with `--force` it moves the profile there. An endpoint without browser login, or a known instance pinned to another URL, needs `--api-key` or `--api-key-stdin`, because browser login applies only to an instance's own endpoint. Optional for `ollama`, which defaults to the local server |
87
89
  | `--api-key KEY` | Pass key on the command line (appears in shell history — prefer `--api-key-stdin`) |
88
90
  | `--api-key-stdin` | Read key from stdin — safe for scripts and CI |
89
- | `--force` | Overwrite an existing profile and rotate its API key |
91
+ | `--force` | Overwrite an existing profile and rotate its API key. Without `--provider`, the profile keeps its provider and endpoint unless `--base-url` replaces it |
90
92
  | `--no-activate` | Write the profile without changing `activeProfile` |
91
93
 
92
94
  API keys are stored in the system keychain (or an encrypted secrets file on systems without a keychain). They are never written in plain text to `config.json`. Run `coda configure --help` for the full reference and exit codes.
93
95
 
94
96
  ## Reconfigure
95
97
 
96
- To re-authenticate within an active session (e.g. after an OAuth session expires), run `/login` — it re-initiates browser OAuth without reopening the full wizard. For first-time provider setup or editing an existing provider, use `/providers` inside a session (changes take effect after a restart) or `coda --reconfigure` from your terminal. Use `/providers` to switch between configured providers anytime — the provider you configure or select there becomes the **active** one. `coda --reconfigure` edits a provider's settings *without* changing which provider is active.
98
+ To re-authenticate within an active session (e.g. after an OAuth session expires), run `/login` — it re-initiates browser OAuth without reopening the full wizard. To add a provider or edit an existing one, use `/providers` inside a session or `coda --reconfigure` from your terminal. Both open the same wizard, and the provider you configure or select there becomes the **active** one. Inside a session, a save that only changes the Glob.AI project of the active profile applies right away; any other change applies after a restart, and CODA says so (`Restart CODA to load it`). `coda --reconfigure` exits when the wizard closes, so the next launch uses the change.
97
99
 
98
- You can configure **more than one provider** and keep them side by side — for example a Glob.AI OS environment for day-to-day work and a local Ollama for offline testing. `/providers` lets you add, edit, remove, and switch between them. If you only want to *change which configured profile is active* (not add or edit one), `/switch-profile` (alias `/sp`) is the quicker path — see [Switch between configured providers](#switch-between-configured-providers). Either way, the change applies after a restart.
100
+ You can configure **more than one provider** and keep them side by side — for example a Glob.AI instance for day-to-day work and a local Ollama for offline testing. `/providers` lets you add, edit, remove, and switch between them. If you only want to *change which configured profile is active* (not add or edit one), `/switch-profile` (alias `/sp`) is the quicker path, and it applies to an idle session right away — see [Switch between configured providers](#switch-between-configured-providers).
99
101
 
100
- ### Switch a Glob.AI OS provider between OAuth and API key
102
+ ### Switch a Glob.AI profile between OAuth and API key
101
103
 
102
- To change *how* you authenticate to the same environment — say, move from a pasted API key to browser OAuth, or the reverse — reopen the wizard with `/providers` (or `coda --reconfigure`), select that environment again, and pick the other authentication method. CODA replaces the stored credential: an OAuth session is captured for you, or a new key is written to `~/.coda/.secrets`. The change takes effect after a restart. To drop the current credential entirely, `/logout` signs out of the active Glob.AI OS session.
104
+ To change *how* you authenticate to the same instance — say, move from a pasted API key to browser OAuth, or the reverse — reopen the wizard with `/providers` (or `coda --reconfigure`), select that instance again, and pick the other authentication method. CODA replaces the stored credential: an OAuth session is captured for you, or a new key is stored in your system keychain (or the encrypted secrets file where there is no keychain). The change takes effect after a restart. To drop the current credential entirely, `/logout` signs out of the active Glob.AI session.
103
105
 
104
106
  ## Troubleshooting
105
107
 
106
108
  - **The browser didn't open during OAuth** — copy the URL CODA prints and open it manually. Once you finish signing in, the session is captured automatically.
107
- - **"No project found" after OAuth** — your account may not be assigned to a project in that environment. Pick a different environment, or use `/project` after sign-in to select one.
108
- - **A key stopped working** — re-run `/providers` (or `coda --reconfigure`) and paste a fresh key. Keys live in `~/.coda/.secrets`; rotating one there is enough.
109
- - **Changes to `/providers` didn't take effect** — provider changes apply after a restart. Exit and relaunch CODA.
109
+ - **"No project found" after OAuth** — your account may not be assigned to a project on that instance. Pick a different instance, or use `/project` after sign-in to select one.
110
+ - **A key was never entered** — CODA shows the API-key prompt on the next launch.
111
+ - **A key stopped working** — re-run `/providers` (or `coda --reconfigure`) and paste a fresh key. Keys live in your system keychain (or the encrypted secrets file); rotating one there is enough.
112
+ - **Changes to `/providers` didn't take effect** — only a change of Glob.AI project applies in the session; other provider changes apply after a restart. Exit and relaunch CODA.
110
113
 
111
114
  ## What's next
112
115
 
@@ -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
  });
@@ -160,8 +160,8 @@ api.on("context", async (context) => {
160
160
  | `session_start` / `session_end` | `{ sessionId }` | After session creation / when it ends |
161
161
  | `session_shutdown` | `{}` | Process exit — flush buffers |
162
162
  | `before_agent_start` | `{ text, sessionId }` | Before the agent loop |
163
- | `agent_start` / `agent_end` | `{ turnId }` | Agent loop boundaries |
164
- | `turn_start` / `turn_end` | `{ turnId }` | Per-LLM-turn boundaries |
163
+ | `agent_start` / `agent_end` | `{ turnId }`; `agent_end` also carries `breakReason?` and `finalReply?` | Agent loop boundaries. `finalReply` is the loop's committed final answer (absent when there is none) |
164
+ | `turn_start` / `turn_end` | `{ turnId }`; `turn_end` also carries `outcome?` | Per-LLM-turn boundaries. `outcome` is `committed` or `discarded` — a discarded turn (for example, one an automatic retry replaced) should be dropped by an extension that assembles text from `message_update` |
165
165
  | `context` | `{ systemPrompt, messages, tools }` | Mutate before each LLM call |
166
166
  | `input` | `InputEvent` | Transform user input before send |
167
167
  | `model_select` | `{ model }` | After `setModel()` switches the active model |
@@ -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
@@ -12,7 +12,7 @@ coda --version
12
12
 
13
13
  ### How do I add or change a provider?
14
14
 
15
- From your terminal (outside a session): `coda --reconfigure`. From inside an active session: `/providers`. Note that `/providers` changes require restarting CODA to take effect.
15
+ From your terminal (outside a session): `coda --reconfigure`. From inside an active session: `/providers`. Both open the same wizard, and the provider you configure there becomes the active one. A `/providers` save that only changes the Glob.AI project applies right away; other changes need a restart of CODA to take effect.
16
16
 
17
17
  ### How do I set up two projects (e.g. two Clients projects) and switch between them?
18
18
 
@@ -20,7 +20,7 @@ Configure each one as its own profile, then switch with `/switch-profile`:
20
20
 
21
21
  1. Run `/providers` and sign in to the first Clients project (OAuth or API key). CODA saves it as a named profile.
22
22
  2. Run `/providers` again and sign in to the **second** Clients project. Because it's a different organization/project, CODA stores it as a **separate** profile rather than overwriting the first.
23
- 3. From then on, flip between them with `/switch-profile` (alias `/sp`) — no argument opens a picker, or pass the profile id directly (`/switch-profile geai-clients`). The switch is saved as `activeProfile` and applies on the next launch.
23
+ 3. From then on, flip between them with `/switch-profile` (alias `/sp`) — no argument opens a picker, or pass the profile id directly (`/switch-profile geai-clients`). The switch is saved as `activeProfile` and applies to the session right away when it is idle; while a response is running, it applies on the next launch.
24
24
 
25
25
  Use `/switch-profile` when you only want to change which configured profile is active; use `/providers` to add, edit, or remove one. See [Connect a Provider](#connect-provider) › "Switch between configured providers".
26
26
 
@@ -28,10 +28,10 @@ Use `/switch-profile` when you only want to change which configured profile is a
28
28
 
29
29
  You have two options:
30
30
 
31
- - **Stay in the session** — run `/project` (Glob.AI OS OAuth only). It lists the organizations and projects your account can access; pick one, or run `/project <id>` directly. This re-targets the active project without a restart. See [Connect a Provider](#connect-provider) › "Switching the active Glob.AI OS project".
32
- - **Switch profiles** — if you've configured the other project as its own profile (see above), `/switch-profile` selects it instead. That change applies on the next launch.
31
+ - **Stay in the session** — run `/project` (Glob.AI OAuth only). It lists the organizations and projects your account can access; pick one, or run `/project <id>` directly. This re-targets the active project without a restart. See [Connect a Provider](#connect-provider) › "Switching the active Glob.AI project".
32
+ - **Switch profiles** — if you've configured the other project as its own profile (see above), `/switch-profile` selects it instead. That change applies right away when the session is idle, else on the next launch.
33
33
 
34
- Reach for `/project` for a quick in-session project change on the same login; use `/switch-profile` to move between separately configured profiles (which may also differ in environment or auth method).
34
+ Reach for `/project` for a quick in-session project change on the same login; use `/switch-profile` to move between separately configured profiles (which may also differ in instance or auth method).
35
35
 
36
36
  ### How do I run CODA in batch mode, and how does it authenticate?
37
37
 
@@ -45,9 +45,9 @@ By default a batch run uses your **active profile** (`activeProfile` from `~/.co
45
45
 
46
46
  You can't start an interactive **OAuth browser login** in batch mode — there's no browser to hand off to. For headless OAuth, reuse a profile you already authenticated interactively (`--profile <id>` or the active profile). To provide credentials inline for a one-off run without saving them, use the ephemeral flags — for example `--provider openai-compat --base-url … --api-key …`, or `--provider glob-ai --instance clients --api-key …`. The key is held only in memory and never written to disk. See [Automate with headless mode](#guide-automate) › "Authenticating in batch mode".
47
47
 
48
- ### CODA opened and immediately shows a setup wizard. Is that normal?
48
+ ### CODA opened and immediately asked me to sign in. Is that normal?
49
49
 
50
- Yes. The wizard appears automatically on first launch if no provider is configured. Follow the prompts to add your credentials. You can also trigger it manually at any time with `coda --reconfigure`.
50
+ Yes. On first launch, with no provider configured, CODA picks the default Glob.AI instance, names it, and asks for its credential — a browser sign-in, or an API key for a key-only instance. That is the whole setup. If your account lives on another instance, run `coda --instance <id>` for one run or `coda configure --instance <id>` to change your default (with `--api-key-stdin` for a key-only instance such as `corp` or `us-v1`). The full setup wizard is still there for other providers: `coda --reconfigure`.
51
51
 
52
52
  ### How do I get help from inside CODA?
53
53
 
@@ -59,13 +59,21 @@ A few ways: type `/help` for the command list, press `?` for the keyboard-shortc
59
59
 
60
60
  Use `coda --lastsession` to resume the most recent session. For a specific session, use `coda --session-id <id>` — when you exit, CODA prints the exact `coda --session-id <id>` command, ready to copy and paste. From inside CODA, browse sessions with `/sessions`.
61
61
 
62
+ ### CODA won't start: "its schema differs from what this CODA version needs"
63
+
64
+ Every time it starts, CODA checks the session database (`~/.coda/coda.db`) and repairs what it safely can on its own. If something can't be repaired — for example the file was changed by a development build, restored from an old backup, or edited by hand — CODA stops before writing anything, lists each problem, and says "Nothing was modified". Either open the database with the CODA version that last used it, or start over with a new session history: close every CODA window, back up the database, and move `coda.db` together with `coda.db-wal` and `coda.db-shm` (if present) out of `~/.coda/`. The next start creates a new database.
65
+
66
+ ### CODA won't start: "it was upgraded by a newer CODA"
67
+
68
+ Another CODA — a newer CLI, or an app built on a newer CODA SDK — upgraded the session database, which they share, to a version this CODA can't safely use. Nothing was modified. Run `coda upgrade` to bring this installation up to date.
69
+
62
70
  ### What does the context percentage in the status bar mean?
63
71
 
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.
72
+ 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
73
 
66
74
  ### CODA seems to have "forgotten" something from earlier in the session. Why?
67
75
 
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.
76
+ 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
77
 
70
78
  ## Making changes
71
79
 
@@ -77,11 +85,21 @@ Type `/timeline` (or `/rewind`, or press **Esc** twice) to see all snapshots fro
77
85
 
78
86
  CODA runs an **authorization engine** that decides `allow` / `ask` / `deny` for every tool call. Two levers control it:
79
87
 
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`.
88
+ - **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). A truly-fresh install (no `permissions` block in any config) starts in **auto**; once any `permissions` block exists without a `defaultMode`, sessions start in **default** — so an upgrade never silently raises autonomy. Saving a rule never changes your mode, so after your first rule new sessions start in `default`; to keep starting in auto, set `permissions.defaultMode: "auto"` yourself or approve the mode change `/init-rules` offers. A config file with a syntax error starts the session in `default`, never `auto`. A managed policy can still force `default`, a project config can tighten but cannot raise the mode, and headless `coda -p` ignores `defaultMode` (it follows `--auto-approve`). A session keeps its mode when you resume it.
81
89
  - **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
90
 
83
91
  The legacy `bash.autoApproveLevel` ("safe"→"high") was replaced by this model; a stored `high` migrates to `auto`.
84
92
 
93
+ ### CODA asked if I want to set up permission rules — what is that?
94
+
95
+ If you have **no `allow` rules** in either your project `.coda/config.json` or your global `~/.coda/config.json`, CODA offers to run the **`/init-rules`** skill with a Yes/No prompt. On a fresh install the default permission mode is `auto` — where only your explicit `ask`/`deny` rules and the catastrophic floor stop the agent — so `/init-rules` helps you set up sensible `allow`/`ask`/`deny` rules for how your project actually works.
96
+
97
+ The prompt appears **after you send your first message** — that message goes through normally and lands you on the usual chat screen, then CODA asks. It never interrupts the home screen. It is offered at most once each time you start CODA (`/new` or `/clear` don't bring it back).
98
+
99
+ - **Yes** runs the skill.
100
+ - **No** (or Esc) dismisses it and it won't ask again.
101
+ - To turn it off permanently, set `"onboarding": { "suggestInitRules": false }` in your config. You can always run `/init-rules` yourself later.
102
+
85
103
  ### How does CODA decide what's safe to run without asking?
86
104
 
87
105
  It **parses** each command into a syntax tree (not string-matching) and classifies it by capability — read, write, network, destructive, catastrophic — across bash, PowerShell, and cmd. The decision is **deny-first**: explicit deny rules win, then your permission mode fills the gaps, then the un-relaxable floor plus self-protection clamp the dangerous cases. So `cat file` reads freely, `git commit` asks in `default`, `rm -rf /` is refused in every mode, and piping a remote script into a shell (`curl … | sh`) is denied by default. (`rm` and PowerShell `Remove-Item` deny for out-of-tree, absolute, or non-literal targets; an in-tree delete like `rm ./tmp` is auto-allowed in `default`/`auto` as an easily-reverted change, while recursive/absolute forms stay un-relaxable.)
@@ -100,7 +118,7 @@ Some editors capture `Ctrl+P` before CODA sees it. On **Windows/Linux**, VS Code
100
118
 
101
119
  ### What is AGENTS.md and should I have one?
102
120
 
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.
121
+ 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
122
 
105
123
  ## Extensions and tools
106
124
 
@@ -112,6 +130,10 @@ Open the `/mcp` manager inside CODA and add the server — paste its JSON or imp
112
130
 
113
131
  Create a `.md` file with YAML frontmatter (`name` and `description` are required) and place it in `<project>/.coda/skills/` or `~/.coda/skills/`. The slash command `/skill-name` invokes it. See [Extend CODA](#guide-extend) for a complete example.
114
132
 
133
+ ### Can I use skills from Claude, Codex, or OpenCode?
134
+
135
+ Yes. CODA can scan those agents' skill folders (`.claude/skills`, `.codex/skills`, `.opencode/skills`) plus the cross-tool `.agents/skills` — without copying anything. Foreign sources are **off by default**; turn one on from `/settings → Skills` or with `coda skills enable <source> --global|--project`. Add extra folders with `coda skills add-path <dir>`. See [Extend CODA](#guide-extend) › § "Import skills from other coding agents".
136
+
115
137
  ### How do I create an extension?
116
138
 
117
139
  The easiest way is to ask CODA: run `/create-extension` and describe what you want in plain language — the built-in `create-extension` skill scaffolds the TypeScript file and places it in the right folder for you. If you'd rather hand-write or fine-tune one, see [Writing Extensions](#extensions) for the full API reference.
@@ -130,7 +152,7 @@ Open `/workflows` and press **`c`** on a running entry, or run `/workflows stop
130
152
 
131
153
  ### How do I install a plugin or browse the marketplace?
132
154
 
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).
155
+ 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
156
 
135
157
  ## Models and cost
136
158
 
@@ -147,6 +169,16 @@ CODA re-checks your configured model against the provider's live catalog at star
147
169
 
148
170
  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
171
 
172
+ ### How do I set the reasoning (thinking) effort for a single headless run?
173
+
174
+ Pass `coda --reasoning-effort <level>` (`none|minimal|low|medium|high|xhigh|max`, case-insensitive) alongside your headless prompt:
175
+
176
+ ```bash
177
+ coda -p "explain this repo" --reasoning-effort high
178
+ ```
179
+
180
+ 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.
181
+
150
182
  ### Where do I see token usage and cost?
151
183
 
152
184
  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.
@@ -155,11 +187,11 @@ The TUI status bar shows the context fill percentage and running token/cost figu
155
187
 
156
188
  ### Where are my config, sessions, and logs stored?
157
189
 
158
- Everything lives under `~/.coda/` — `config.json`, `.secrets`, the session database `coda.db` (with per-session override files under `sessions/<id>/`), `logs/`, `checkpoints/`, and `exports/`. Point `CODA_HOME` at a different directory to relocate all of it — or pass `--coda-home <path>` on the command line (both have the same effect; the flag wins when the env var is not set). See [Configuration Reference](#config-reference).
190
+ Most state lives under `~/.coda/` — `config.json`, `.secrets` (a marker file for generic `${VAR}` values; newly added API keys go through your system keychain instead, though a legacy key may remain here in plaintext on a host without an OS keyring), `.credentials.json` (the encrypted fallback store, only present where there is no OS keyring), the session database `coda.db` (with per-session override files under `sessions/<id>/`), `logs/`, `checkpoints/`, and `exports/`. Your OS keychain entry for provider API keys, when available, is external to this directory. Point `CODA_HOME` at a different directory to relocate all of it — or pass `--coda-home <path>` on the command line (both have the same effect; precedence is `--coda-home` > `CODA_HOME` > the default, so an explicit flag overwrites an inherited env var). See [Configuration Reference](#config-reference).
159
191
 
160
192
  ### How do I view or share logs safely?
161
193
 
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).
194
+ 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
195
 
164
196
  ### Can I use checkpoints in CI?
165
197
 
@@ -167,7 +199,7 @@ Not for rollback — the `/timeline` picker is a TUI feature. In headless mode c
167
199
 
168
200
  ### How does CODA behave in a monorepo?
169
201
 
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).
202
+ 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
203
 
172
204
  ## See also
173
205