Working with AI coding agents
How to record Claude Code, Codex, Cursor, or any agent's work as an Arc, what is captured today, and a handoff pattern that works.
validated against patcharc 0.2.0 · 2026-08-22
PatchArc does not care who made the commit. The observer reads Git, so an agent's commits are recorded exactly like yours. That is the honest scope of 0.2.0: commits and touched files are evidence; the agent's conversation is not.
Recording an agent session
$ patcharc start --detach "Agent: migrate auth tests to vitest"
# run your agent; let it commit as it works
$ patcharc note "Agent chose to keep the old helpers; I agree for now"
$ patcharc risk "Snapshot tests were regenerated, not reviewed line by line"
$ patcharc stop
Tips that make the record useful:
- Ask the agent to commit in small steps. Each commit is a row in the story; one giant commit is one row.
- Record decisions as you review the agent's work, not after. The timestamps show what you knew when.
- Put the session's intent in the goal string; it becomes the first section of the review.
Claude Code
Claude Code commits through Git like any tool, so nothing special is needed. If you want the agent to record its own decisions, give it the commands in a CLAUDE.md instruction:
When you make a design decision, run: patcharc decision "<one sentence>"
When you notice a risk you did not fix, run: patcharc risk "<one sentence>"
The observer records the resulting events alongside the commits.
Codex, Cursor, and others
Same approach. Any tool that produces commits is covered. Tools that only edit the working tree without committing are invisible to the observer until a commit lands; ask for commits, or commit yourself at checkpoints.
What is not captured yet
- Transcripts, prompts, token usage, and tool calls. The
adapters/directory in the repository (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, generic JSONL) is a placeholder in 0.2.0. - Which lines an agent wrote versus you. There is no per-line attribution.
- Test runs the agent executed. See Recording an Arc.
If you need the transcript itself, pair PatchArc with a transcript tool and link the two; see the comparison with Entire and Lore.
A handoff pattern
- The agent works inside an Arc; you record decisions and risks as you review.
patcharc stop, thenpatcharc verifythe capsule.patcharc share --visibility publicand paste the ArcLink into the pull request, or attach the.parcto the ticket. A reviewer can verify the file offline before reading it.- The next person (or the next agent session) starts from the review: goal, what changed, scopes, decisions, open risks.