Repository navigation
Conversation
…, not the command, so Allow matches python3 -c prompts (THI-422) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Replaced by #52: same change, with the branch on origin and the review's four fixes added. |
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.
Follow-up to #40 (THI-422), found during the hand checks.
For some Bash commands (
python3 -c …), Claude Code 2.1.280 adds a row under the description,This command requires approval, at indent 1.dialog_matcheshashed it as part of the command block, so the digest never equalled the hook's key and every Allow on such a prompt answered 409. That failed safe, but those prompts couldn't be allowed.The change.
dialog_matchesskips that exact row, and only that row, when it sits at the end of the block and shallower than the command (_TRAILING_CHROME):Tests:
tests/fixtures/permission_dialogs/bash_requires_approval.txt, added to every list of real captures: parse, own key, no other key, the hook's own key, andparse_panereading it as needs-input;⚠ Sandbox disabledin that position fails, and the known text at indent 3 is part of the command;pytest 2030 ·
bin/checkclean.🤖 Generated with Claude Code