Repository navigation
fix(agent): name spilled outputs by id and content, not id alone - #501
Merged
Merged
Conversation
store_artifact named the file `<tool_call_id>.txt` and kept an existing file. Ids repeat: Gemini numbers calls from `gcall_1` in every stream, fallback ids restart, and every session in the project shares the directory. A later result's pointer then led `read` to an earlier call's output. The name now carries a stable FNV-1a hash of the body; the same body still reuses its file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
enabled auto-merge (squash)
November 25, 2026 16:08
Merged
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.
An old tool output spilled to disk was saved as
.whycodes/scratch/artifacts/<tool_call_id>.txt, and an existing file with that name was kept as it was. Tool call ids repeat:gcall_1in every stream;A later result's pointer could therefore send
readto an earlier call's output, which is quietly wrong context for the model.The file name now carries a stable FNV-1a hash of the body (
<id>-<hash>.txt). A reused id with a new body gets its own file, and the same body still maps to the same file.Tests: a reused id with two different bodies gives two files, each holding its own output. The spill and lifecycle tests now look artifacts up by the new names. All 176 session tests pass.
🤖 Generated with Claude Code