Skip to content

fix: say a blocked shell call ran none of its chained commands - #170

Merged
ryzizub merged 1 commit into
VeryGoodOpenSource:mainfrom
mark-wint:fix/cli-workaround-deny-says-whole-call-refused
Oct 5, 2026
Merged

ryzizub merged 1 commit into
VeryGoodOpenSource:mainfrom
mark-wint:fix/cli-workaround-deny-says-whole-call-refused

Conversation

@mark-wint

Copy link
Copy Markdown
Contributor

Description

block-cli-workarounds.sh refuses the whole shell call, so a command chained with the blocked one never runs either. The deny reason only said "Use the very_good_cli MCP 'test' tool instead", which doesn't tell the agent that the rest of the call was dropped too.

This happened in a real session: an agent ran python3 <edit pubspec.yaml> && dart test in one call. The hook refused it, the agent switched to the MCP test tool, and it carried on as if the pubspec edit had gone through. It found the missing dependency 13 minutes later, only because a git diff happened to show the file unchanged. Across 175 sessions in one repo, the hook fired in 15.

Every deny reason from this hook (current, outdated, missing, or unrunnable CLI) now ends with:

This whole shell call was refused, so none of it ran: run any other commands it chained in a call of their own.

  • hooks/scripts/block-cli-workarounds.sh: adds the sentence to all four deny branches.
  • hooks/scripts/block-cli-workarounds_test.sh: adds four cases, one per CLI status, asserting that a chained command's deny reason says so. They fail against main (44 passed, 4 failed) and pass with this change (48 passed).
  • CLAUDE.md: notes the behavior in the hook's description.

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Code refactor (refactor)
  • Documentation (docs)
  • CI change (ci)
  • Chore (chore)

🤖 Generated with Claude Code

block-cli-workarounds refuses the whole shell call, so a command chained
with the blocked one (`edit-a-file && dart test`) never runs either. The
deny reason only said to use the MCP tool, so an agent could assume the
chained command's side effect happened and carry on without it. Every
deny reason from this hook now says the whole call was refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mark-wint
mark-wint marked this pull request as ready for review October 2, 2026 14:11
@mark-wint
mark-wint requested a review from a team as a code owner October 2, 2026 14:11
@ryzizub
ryzizub merged commit 787d690 into VeryGoodOpenSource:main Oct 5, 2026
5 checks passed
@vgvbot vgvbot mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants