Repository navigation
Keep each tool call's id in stored transcripts - #120
Merged
Merged
Conversation
Message::ToolUse gains an optional `id`, serialized as `id` and left out when absent, so transcripts stored before this still deserialize. The transcript parser in cas_bridge fills it with the agent's own call id: the `id` of a Claude-style `tool_use` block (Claude Code `toolu_...`, Droid `call_...`) and the `call_id` of a Codex `function_call`. Codex `custom_tool_call` items (freeform `apply_patch`) were dropped before; they now become tool-use messages with their `call_id` too. These are the ids the agents' hooks send as `tool_use_id`, which checkpoints record, so Autter can match a line to the exact tool call that wrote it instead of matching by time. `id` is on the redaction denylist and the CAS upload sends the payload as untyped JSON, so the id reaches Autter unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Stored transcripts now keep the id of every tool call, so the Autter PR page can point a changed line at the exact tool call that wrote it instead of matching by time. - Each tool call carries the agent's own id: the id of a Claude Code (toolu_...) or Droid (call_...) tool_use block, or the call_id of a Codex call. These are the ids the agents' hooks report as tool_use_id. - Codex freeform apply_patch calls (custom_tool_call), which were dropped before, are now kept as tool calls with their call_id. - Transcripts stored before this have no ids and still parse as before. Tests: cargo check --locked passes (3 existing lib warnings). Code change and its tests are in 6449374. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Autter's PR page shows, for each changed line, the tool call that wrote it. Today it can only match a line to a call by time, because stored transcripts drop the call's id. The checkpoints already record the hook's
tool_use_id. With the id kept in the transcript too, the backend (already shipped in autter-monorepo) matches lines to calls exactly.What changes
Message::ToolUsegains an optionalid. It is serialized asidand left out when absent, so transcripts stored before this still deserialize.cas_bridgefills the id from:tool_useblocks: Claude Codetoolu_…, Droidcall_…;function_callitems, fromcall_id.custom_tool_callitems (freeformapply_patch) were dropped before. They now become tool-use messages with theircall_id.idis on the redaction denylist. The CAS upload sends the payload as untyped JSON, so the id reaches Autter unchanged.Ids per agent
tool_use_id. The repo has no real hook payload that proves this.__vscode-<ts>suffix that the transcript id lacks."bash". No transcript id will ever equal it, so it never produces a false match.Tests
id;cargo test --lib: 2524 passed. One failure needs Windows symlink privilege:compute_watermarks_uses_symlink_metadata_not_target_mtime.cargo clippy --all-targets -D warningsis clean apart from lints that are new in Rust 1.99. They fire in 15 places that already existed, none in this change.Not in this PR
event_rolereadstype:"message"beforemessage.role.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.