Skip to content

Working with Agents ​

Codeg doesn't ship its own model. It's a workspace for agents — it connects to the coding-agent CLIs you already run, like Claude Code, Codex, and Gemini, and gives every one of them the same surface: the same composer, the same files and diffs, the same git and terminal. You choose which agent handles a conversation, and everything around it stays the same.

This page covers the essentials — enabling an agent, making sure it's ready to run, and starting a session. Four neighbours go deeper: Supported Agents is the full roster, Per-Agent Setup goes through each agent's own settings, Authentication & Models covers signing in and picking a model, and Custom Agents is how to add one that isn't on the roster.

How agents work ​

Each agent is a separate command-line program. When you start a session, Codeg launches that program as a background process and talks to it over the Agent Client Protocol (ACP) — the shared language that lets one workspace drive many different agents. That's why the experience is consistent no matter which one you pick.

Codeg supports twenty agents out of the box, delivered three ways:

  • Most run through npx (an npm package), so they need Node.js on your machine. Codeg installs and updates them for you.
  • OpenCode, Cursor and Google Antigravity are native binaries Codeg downloads for your platform (Cursor bundles its own runtime, so it needs no Node.js either).
  • Kiro CLI, TRAE CLI and MiniMax Code use your vendor-installed CLI. Kiro and TRAE offer their native updater through Upgrade; MiniMax installation and updates stay with its official installer. → MiniMax Code

Because ACP is an open protocol, the twenty aren't a limit: you can register any other ACP-compatible agent yourself, from the protocol's public registry or from its distribution JSON, and Codeg drives it the same way. → Custom Agents

Two things are tracked separately for each agent: whether it's enabled (allowed to appear in Codeg) and whether it's installed (actually present on your machine). They're independent — you can enable an agent before installing it, and Codeg will help you install it when the time comes.

Enable an agent ​

Agents are managed in Settings → Agents (titled Agent SDK Management). The Agent List on the left holds every supported agent; select one to see its details on the right. All agents are enabled by default, so there's usually nothing to switch on — but the enable toggle in each agent's header lets you hide the ones you don't use. A + Add custom agent button in the top-right corner is how you extend the list beyond the built-in twenty. → Custom Agents

Only enabled agents appear in the composer's agent picker. Disable the ones you'll never touch to keep that list short; if you ever disable everything, the composer just prompts you to Open Agents settings and turn one back on. The toggle reaches past the picker, too: an agent you've switched off is also dropped from the targets another agent can delegate to.

Check it's ready — preflight ​

Open Settings → Agents and Codeg runs a preflight check on each agent — a quick health report, so you know it'll actually run before you rely on it. You'll see a Version Status line — the version Codeg recommends against the one installed locally, Recommended: … · Local: …, or Not installed; for an agent you installed with its vendor's installer, just the local version — followed by a short checklist, each item marked PASS, WARN, or FAIL.

What it checks depends on how the agent is delivered:

  • npx agents — that Node.js and npm are installed and new enough (each agent sets a minimum Node version).
  • OpenCode and Cursor — that the platform is supported and the binary is downloaded. OpenCode must be 2.0 or later; it installs its declared plugins when a session starts.
  • Kiro CLI and TRAE CLI — one row: that the CLI is on your PATH or in ~/.local/bin. The version row then reads Local: …. Official install; Upgrade runs its own updater., or Not found on this machine with an Install guide link.
  • MiniMax Code — that mcode is on the backend's PATH or in its official installer directory. Missing installations link to the Install guide; updates stay with MiniMax's installer.
  • ZCode — that its bridge is installed, and an Official ZCode runtime row that finds your ZCode and a Node.js 22 or later able to load node:sqlite, in place of the usual Node rows.

Every failing check comes with a fix button right beside it — Install Node.js, for example — and the version row offers Install, Upgrade, or Uninstall as needed, plus Custom install for a version of your choosing where the agent supports one — Kiro CLI and TRAE CLI offer only Upgrade, or Install guide while they're missing. When the agent's newest release is ahead of the one Codeg recommends, an amber Upgrade to unreviewed latest … joins them. → Supported Agents Changed something outside Codeg? Refresh check re-runs the preflight.

Installed an agent's CLI yourself? Codeg counts that. Where it has no managed install of its own, it probes your system for the command — an npx package via npm list -g, a binary on your PATH, or the plain --version convention — and reports the real version instead of Not installed. Since 0.35.0 an npx agent's command is also looked for in ~/.local/bin, after your PATH and before npm's own folder, which is where official installers such as Hermes's put it and where a desktop app launched from the dock wouldn't otherwise look. A self-installed OpenCode 2.x connects too; 1.x is no longer supported. Since a session already preferred whatever was on your PATH, this just means the version row now agrees with what actually runs. Claude Code and Codex are the exception — there Codeg probes for an ACP adapter with its own executable name, not the claude or codex you already have — and so is ZCode, whose bridge needs your ZCode on top. → ACP adapters

And for those, the pane explains itself. "I have claude in my terminal and Codeg says it isn't installed" was baffling enough that Codeg answers it in place: an ACP adapter badge sits beside the agent's name, and the first row of its preflight is an ACP adapter explainer with a Learn more link. It reads your machine rather than reciting the general case — if it found your own CLI it says where, names the adapter package it needs instead, and points out that the two coexist and read the same config directory, so there's no second sign-in. A failed connection is just as specific: it tells you whether the SDK or the ACP adapter is the missing piece. ZCode's row speaks for its bridge instead: it names the package Codeg runs and asks you to install and sign in to the official ZCode first. → ZCode

Preflight checks the plumbing, not the login

Preflight confirms the runtime, version, and install — not whether you're signed in. Getting an agent authenticated (its own subscription, an API key, or a custom endpoint) is a separate step. → Authentication & Models

When Codeg and your terminal disagree ​

Sometimes an agent runs fine in your terminal but Codeg insists it isn't installed. That's almost always a PATH gap: a desktop app launched from the dock doesn't inherit the shell setup that a terminal does, so a Node installed by nvm, fnm, or Homebrew can be invisible to it.

Diagnose — beside the preflight list, and on the banner you get when a session is blocked — runs Environment diagnostics to find out. It probes how the app resolves things, not your shell: the Node and npm it sees, the npm global prefix, where it looked for the agent's executable, any version-manager directories, and — the useful part — a comparison against your login shell, listing the PATH entries your terminal has that the app doesn't. It finishes with a plain verdict, like "The command resolves in your terminal but not in the app — a GUI PATH gap", and often a concrete fix such as fully restarting the app. Since 0.35.0 that verdict also comes when your terminal finds the command and nothing else does, rather than a flat not installed, and the Node.js check compares the full version an agent needs, so a Node 20.2 no longer passes for an agent that wants 20.3. Copy all puts the whole report on your clipboard for a bug report.

Preflight runs on its own every time you open the screen; Diagnose is the deeper probe you run yourself when preflight and reality disagree.

Configure an agent ​

Most agents work the moment they're installed, but each one's detail pane has plenty you can tune — and there are two ways to do it: visual controls for the everyday settings, or the agent's raw config file for anything the UI doesn't expose.

  • Visual settings. The pane surfaces the common options as ordinary form controls — sign-in, model selection, custom endpoints, reasoning effort, and each agent's own switches — so you rarely need to hand-edit anything. Signing in and choosing models are covered in Authentication & Models, and what each agent's pane holds in Per-Agent Setup.
  • Environment Variables. KEY=value pairs passed to the agent when it launches.
  • System Instructions. The agent's global instructions file, editable in place — see below.
  • Config Management. Where the agent has one, edit its own native config file (its Native JSON Config) directly from Codeg, for the settings the visual controls don't reach.
  • Drag to reorder. The order of the Agent List doubles as a preference — the first enabled agent is the one Codeg reaches for when nothing else is specified (more on that below).

Since 0.49.0 the pane is a stack of option cards: each option sits on a card of its own, and clicking a switch's label flips it. Where a card groups several controls — Claude Code's Cache mode, say — the card's heading flips none of them; use each switch's own label. In a long configuration section — Config Management, or an agent's own configuration card — the section's Save button stays pinned to the bottom of the pane while you scroll through that section, so you don't have to scroll back down to save. Save environment variables, Save System Instructions and the Save buttons inside list editors stay where they are.

Change a setting while a session is open and that session keeps running on its old configuration — Codeg won't interrupt you mid-task. Instead, a bar appears at the top of the conversation noting it's still on the previous config; click Reconnect to apply and the session reloads with the new settings while keeping its full history. No need to close and reopen anything.

System instructions ​

Since 0.42.0, the pane of an agent that keeps a global instructions file shows it under Environment Variables, in a System Instructions card: the file's path with a copy button, and its contents in an editor. Write the preferences and working rules you want in every session — role, conventions, what to avoid — in Markdown, and Save System Instructions. Discard changes goes back to the contents last loaded or saved. The file is the agent's own, so its CLI and IDE sessions read the same instructions.

AgentFile
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.override.md if it has content, else ~/.codex/AGENTS.md
Gemini CLI~/.gemini/GEMINI.md
Google Antigravity~/.gemini/AGENTS.md
OpenCode~/.config/opencode/AGENTS.md
Cline~/.agents/AGENTS.md
CodeBuddy~/.codebuddy/CODEBUDDY.md (or CODEBUDDY.mdc, if that's the one that exists)
Kimi Code~/.kimi-code/AGENTS.md
Pithe first of AGENTS.override.md, AGENTS.md, AGENTS.MD, CLAUDE.md or CLAUDE.MD that exists in ~/.pi/agent (a new one is AGENTS.override.md)
Grok~/.grok/AGENTS.md
DeepSeek Harness~/.dsh/AGENTS.md
Qoder~/.qoder/AGENTS.md
Kiro CLI~/.kiro/steering/AGENTS.md
TRAE CLI~/.trae/AGENTS.override.md if it has content, else ~/.trae/AGENTS.md
Command Code~/.commandcode/AGENTS.md
ZCode~/.zcode/AGENTS.md

Hermes, Cursor, MiniMax Code, OpenClaw and custom agents have no card. Where an agent lets an environment variable move its home — CLAUDE_CONFIG_DIR, CODEX_HOME, OPENCODE_CONFIG_DIR and the like — the card follows the variable as Codeg itself was started with it; setting it only in the agent's own Environment Variables doesn't move the card. With a server or a remote workspace, the file is on the machine Codeg's backend runs on.

A few details about saving:

  • It saves to the file you were shown. Clearing Codex's override file saves an empty override rather than switching to AGENTS.md.
  • A missing file is created only when you write something. On macOS and Linux it's created readable by you alone; an existing file keeps its permissions, and a symlinked one stays a link.
  • A file Codeg can't read as text is never overwritten — the save is refused instead.
  • Sessions you open or reopen afterwards pick the change up; one that's running keeps what it started with.

When the agent turns a setting down

Some of what the composer offers is a request, not a command — the agent answers with the options it actually adopted. Pick a model or a mode an agent won't take and it used to look like the setting springing back for no reason. Now Codeg says what was adopted instead, naming it, and keeps your preference for next time: a refusal is often about this session rather than the choice itself, and a model switch an agent declines mid-conversation frequently succeeds in a fresh one.

Let the agent handle its own files and commands ​

Codeg normally serves an agent's file reads, file writes and terminal commands itself, over the protocol. That's convenient — but it means those operations run in Codeg's process, outside whatever sandbox the agent applies to itself. An agent configured to deny reads of **/.env can't enforce it against a read it delegated: its own audit log records the profile as applied, with no violation, because nothing it controls ever saw the access.

A switch beside the environment editor on each agent's page — Let the agent handle files and commands — hands all three back. Codeg then advertises neither channel and refuses both if called anyway, and the agent does its own I/O under its own rules.

It's off by default, and the reason is on the switch: File and terminal operations use the agent's own permissions. codeg adds no sandbox and disables delegation. Enable only with an agent sandbox configured. Most agents ship none, so for most of them this trades a working file channel for nothing.

It also withholds delegation

Turning it on drops the delegation tools for that agent, because delegate_to_agent is a third door into the same room — it has Codeg spawn a second agent under Codeg's policy and relay the output back, which is exactly the containment leak the switch exists to close. The Multi-Agent Collaboration panel names the agents this applies to rather than reading "enabled" while the tools quietly aren't there. Setting CODEG_ACP_HOST_TOOLS=agent in the agent's environment does the same thing. → Configuration

Start a session ​

Start a new conversation and the composer shows an agent picker — a row of pills, one per enabled agent. Click one and Codeg connects to it; from there, set the model, the mode and the agent's other options from the settings button in the composer. All of those come from the agent itself, not Codeg, so what's on offer depends on which agent you're running. Your choice of agent locks in once you send the first message — a conversation stays with the agent that started it.

Which agent by default? Codeg picks in this order:

  1. The folder's default agent, if you've set one (folder menu → Set default agent).
  2. Otherwise, the first agent in your Settings → Agents order.

So a per-folder default always wins, and the list order is the fallback. → The Workspace covers setting a folder's default.

The first time you use an agent in a session, you'll see Connecting… while Codeg launches the CLI and completes its handshake. Since 0.35.2 you can still change your mind then: pick another agent and the one that was starting is stopped at once, and the last one you pick is the one that connects. If it can't connect — the agent's disabled, not installed, unsupported on your platform, or slow to respond — Codeg raises an alert: a toast that says what went wrong, with Retry and, when the fix lives there, Open Agents settings. The alert stays in the status bar's Alerts list afterwards, without the Retry. The connection heart below the composer turns red and says why too.

Connection status ​

While you work, the connection heart below the composer shows the agent's state — connected, connecting, error, or disconnected — with Responding… told apart from a resting Connected in its popover. Click it for the details and a Reconnect that tries to resume the session. Where the agent can't load one, or the load fails, Codeg usually starts a new agent session on the same conversation instead: the transcript stays, but the agent no longer has the earlier context. A few known causes — the session open in another client, a different model provider on Codex — get a banner instead, and the conversation is left as it was. → When the connection looks wrong

Sessions you're not looking at may disconnect after a few idle minutes to free up resources — not while a delegated sub-agent is still running, nor while background work is, up to an hour after its last activity by default (CODEG_ACP_BACKGROUND_KEEPALIVE_MAX_SECS changes that, Configuration), and not a Claude Code session where you've turned Remote Control on with /remote-control (Remote Control that Claude Code starts by itself with the session doesn't hold it up). Since 0.42.1 the same holds when you close a conversation's tab, switch panes or refresh the web page: that work keeps going. Reconnect on the connection that runs the work stops it, and its popover warns you first; reconnecting a window that only attached as a viewer, such as a canvas card for a conversation open in a tab, just re-attaches and leaves the work running. The tab you're actively in stays connected, and Codeg reconnects automatically when you come back to a session.

Next steps ​

Released under the Apache-2.0 License.