Skip to content

Feat: support Codex, Gemini CLI and eight more coding agents - #149

Merged
aayank13 merged 1 commit into
mainfrom
feat/multi-agent-support
Oct 10, 2026
Merged

aayank13 merged 1 commit into
mainfrom
feat/multi-agent-support

Conversation

@aayank13

Copy link
Copy Markdown
Owner

Trodden only worked with Claude Code. This adds Codex, Gemini CLI, Qwen Code, GitHub Copilot CLI, Factory Droid, Cursor, OpenCode, Kilo Code, Kimi Code and Cline.

Capture no longer assumes one agent. The trace building that lived inside the Claude Code parser (prompt summaries, command normalization, relative paths, outcomes, error signatures, file changes) is now an agent-neutral builder, and each agent has a small transcript parser on top of it. Every agent implements one Agent trait in the trodden crate: how its hook payloads map to what Trodden does (recall on a prompt, recall on a failed command, ingest at the end of a turn or session, the verify reminder), how replies must be shaped for that agent, where its sessions live for backfill, and how to install its hooks.

Agents that write transcripts with command results (Codex, Gemini CLI, Qwen Code, Copilot CLI, Factory Droid) are learned from those transcripts and support trodden backfill. Cursor, OpenCode, Kilo Code, Kimi Code and Cline keep no usable record of tool results, so their hooks append to a small per-session journal instead, redacted and reduced the same way a trace is. A journal is deleted once its session has ended and been learned from, and forget --all deletes all of them.

trodden connect <agent> installs the hooks into the agent's user settings, keeping any hooks already there and following symlinked config files; --dry-run shows the change first, trodden disconnect <agent> removes only Trodden's entries, and trodden connect alone lists the agents and which are installed and connected. Claude Code is connected the same way (trodden connect claude-code writes to its settings.json); the plugin still works as an alternative, and connect refuses to add the hooks a second time when the plugin is installed. Where an agent needs a step of its own (Codex asks the user to trust new hooks, Cline needs hooks enabled, Droid and OpenCode need a restart), connect prints it. status, doctor and init now report agents. backfill reads every agent with sessions on disk, or one with --agent.

What each agent's hooks allow differs: Cursor cannot add context to a prompt, Kimi Code ignores output after a failed command, and OpenCode, Kilo Code and Cline cannot continue a finished turn, so those features are off for them. The README has the full table.

Two changes to shared behavior came with it. The verify reminder now fires at most once per injection, tracked in the store (a new reminded_at column), since several agents do not say whether a stop already follows a hook continuation. And a prompt recorded a few seconds after its injection still counts as the injection's turn, because Gemini CLI and Qwen Code write the prompt only after the prompt hook has run. Trodden's own reminder text is never taken as a task prompt by any parser.

Tests cover each parser with shortened transcripts built from the agents' formats, hook event mapping and reply shapes per agent, connect and disconnect round trips on scratch settings files, the journal (round trip, redaction, prompt summaries only, no heredoc bodies, removal after the session ends), and the reminder changes. Each agent was also run end to end with the built binary against scratch homes: hook payloads in, ingest, a procedure learned and recalled. Codex was additionally checked against a real rollout. The recall calibration results are unchanged.

@aayank13
aayank13 merged commit 1984482 into main Oct 10, 2026
4 checks passed
@aayank13
aayank13 deleted the feat/multi-agent-support branch October 10, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant