Repository navigation
Conversation
… what is left out (#392) Approval requests carried at most the first 4000 bytes of a call's arguments, cut into a string ending in "…". Since native bash/edit/write calls can need approval, a long command could hide its risky tail from the person deciding. - Worker: approval requests now carry the arguments whole up to 64 KiB of serialised JSON, plus argumentsBytes and argumentsTruncated. Larger arguments become a string with the head, the tail and the number of bytes left out between them, so the end of a command is always visible. - Event and audit payloads keep short copies; a cut copy now ends with "[truncated: N bytes in total]". - Web: the approval view shows an "Arguments truncated" warning with the full size and opens the arguments; long summary rows say they are cut. Strings from older workers count as truncated. - Docs: approvals guide and runtime contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #392.
Summary
Approval requests carried at most the first 4000 bytes of a call's arguments,
cut into a string ending in "…". Since native bash/edit/write calls can need
approval, a long command could hide its risky tail from the person deciding.
serialised JSON, plus argumentsBytes and argumentsTruncated. Larger
arguments become a string with the head, the tail and the number of bytes
left out between them, so the end of a command is always visible.
"[truncated: N bytes in total]".
size and opens the arguments; long summary rows say they are cut. Strings
from older workers count as truncated.
Testing
cargo fmt --check,clippy -D warnings: cleancargo test --workspacewith a database: 764 passed, 0 failedbashcommand is carried whole; arguments over 64 KiB carryargumentsTruncatedandargumentsBytes; event copies end with the new markertypecheckpasses,test98 passed (4 new inlib/approval-arguments.test.ts);pnpm docs:checkpassedNot checked in a browser. No migration. Above 64 KiB the middle of the call is still hidden; the warning tells the approver to reject if they need it.
🤖 Generated with Claude Code