Docs Coding agents

Coding agents

Which coding agents have adapters, how each is captured, and how subagents are linked to their parent session.

What coding.sh captures from each agent, and how. Each agent has an adapter that installs capture, maps the agent's events into the trace format, imports past sessions and drives the agent headless for eval runs, in an isolated config so your own setup is never touched. Agents without hooks are recorded by wrapping the command: coding.sh run -- <cmd>.

Matrix

Agent Status Live capture Backfill Headless runs

claude-code
Verified on real sessions settings.json hooks projects/<slug>/<session>.jsonl transcripts claude -p --output-format stream-json

codex
Verified on real sessions hooks.json hooks (you approve them with /hooks) sessions/**/rollout-*.jsonl codex exec --json

opencode
Verified on a real install plugin (2.x and 1.x) opencode.db (1.x and 2.x), JSON storage (older 1.x) opencode run --format json

cursor
Fixture-tested hooks.json, partial in -p mode agent-transcripts/*.jsonl (undocumented format) agent -p --output-format stream-json

t3code
Verified on a real install its Codex and Claude Code hooks, tagged as T3 ~/.t3/userdata/statev2.sqlite (and v1 state.sqlite) none (desktop app; it runs codex app-server or the Claude Agent SDK)

antigravity
Verified on real sessions hooks.json brain/<id>/…/transcript.jsonl agy -p --output-format stream-json

gemini-cli
Fixture-tested settings.json hooks tmp/<slug>/chats/*.jsonl gemini -p -o stream-json

copilot-cli
Verified on a real install hooks/coding-sh.json session-state/<id>/events.jsonl copilot -p --output-format=json

amp
Fixture-tested plugin None amp -x --stream-json

pi
Verified on a real install extension sessions/--<cwd>--/*.jsonl pi -p --mode json

droid
Verified on a real install hooks.json sessions/-<cwd>/*.jsonl droid exec -o json

goose
Verified on a real install plugin hooks.json sessions.db goose run --output-format stream-json

aider
Verified on a real install coding.sh run -- aider … (each reply's tokens and cost from Aider's analytics log) None aider --message … --yes-always --no-stream

wrapper
Tested coding.sh run -- <cmd> None the command itself
StatusMeans
Verified on real sessionsChecked against real sessions of the agent.
Verified on a real installThe current release ran a session against a local stub model; its hooks fired, the session was checked, and the payloads are CI fixtures.
Fixture-testedCI checks it against the agent's documented and recorded formats. Nobody has run it on a live install yet.

If you use a fixture-tested agent, an agent support report saying whether it worked moves it to verified.

Subagents

A subagent appears as subagent.start and subagent.end events in the parent session, paired by subagentId. When the agent keeps a separate transcript or session for the subagent, that becomes a child session whose parent points back. coding.sh sessions --subagents lists child sessions.

Agent How subagents are captured
SubagentStart/Stop hooks; subagents/agent-*.jsonl transcripts
SubagentStart/Stop hooks; subagent threads in rollouts
Child sessions, linked to the parent session
subagentStop only (subagentStart is a permission gate, not registered)
Subagent threads become child sessions
invoke_subagent tool call spans the subagent; its internals are not exposed
Child chat files become child sessions
subagentStart/Stop hooks; events inside carry the subagent id
Task, oracle, librarian, finder tool calls span the subagent
None (Pi has no subagents)
Task tool call is the start, SubagentStop the end
sub_agent sessions become child sessions
None

The hook command

Every adapter installs the same command:

shell
/bin/sh "/Users/you/.coding.sh/bin/hook.sh" <agent-id> <EventName>   # absolute, quoted path
node "C:/Users/you/.coding.sh/bin/hook.mjs" <agent-id> <EventName>      # on Windows
  • It exits 0 every time and prints nothing, unless an agent's protocol requires a reply (Cursor's beforeSubmitPrompt gets {"continue":true}).
  • It never answers a permission question. Where an agent treats a hook's silence or exit code as a decision (Cursor's permission events, Copilot's preToolUse, Antigravity's PreToolUse, Amp's tool.call), that event is not registered at all.
  • Entries are marked ("_codingsh": true where the format allows) so uninstall removes only ours. Where a format has no room for a marker, ownership is recorded in ~/.coding.sh/installs.json.
  • The original file is backed up to ~/.coding.sh/backups before every edit.

Agent notes

  • Codex runs new hooks only after you trust them with /hooks. coding.sh never writes trust hashes; eval runs pass --dangerously-bypass-hook-trust inside an isolated CODEX_HOME.
  • Cursor also runs Claude Code hooks from .claude/settings.json. Those payloads are dropped by the Claude Code adapter, so each Cursor event is captured once.
  • Amp keeps threads server-side, so there is no local backfill.
  • Kiro CLI has no adapter yet. Wrap it: coding.sh run -- kiro-cli chat --v3 --no-interactive --trust-all-tools "…". That records start, end, exit code, duration and file changes, but not prompts, tool calls or tokens.
  • Kiro's OpenTelemetry export is a daily push of account totals, not per-session spans, so the local OTLP receiver can't use it. The Kiro IDE is not captured.
  • Antigravity CLI (agy) replaced Gemini CLI. Record it with the antigravity adapter; gemini-cli still reads sessions from older installs.

Model API proxy

Hooks and transcripts record what an agent did. To also record what it sent the model (the full system prompt, tool definitions and messages of every call), route it through the local proxy:

shell
coding.sh init --proxy              # Claude Code and Codex
eval "$(coding.sh proxy env)"        # any other client

init --proxy points Claude Code and Codex at coding.sh proxy on 127.0.0.1:4320 and starts it. Each call lands in the session the hooks capture. An agent that already calls a gateway keeps calling it, through the proxy. See Capture with the proxy.

Other agents

Cline CLI, Kiro CLI, Qwen Code, Crush have no adapter yet. Record them with coding.sh run -- <cmd>, which keeps the start, end, exit code, duration and file changes.