Skip to content

fix(claude): skip checkpoint requests for read-only and unsupported tools - #2028

Merged
svarlamov merged 1 commit into
mainfrom
feat/claude-skip-readonly-hooks
Jul 29, 2026
Merged

fix(claude): skip checkpoint requests for read-only and unsupported tools#2028
svarlamov merged 1 commit into
mainfrom
feat/claude-skip-readonly-hooks

Conversation

@svarlamov

@svarlamov svarlamov commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • The Claude preset produced pre/post checkpoint requests for every hook invocation — including read-only tools (Read, Glob, Grep, Task) and unknown tools — treating anything that wasn't Bash as a file edit. Each request cost hook parsing, transcript handling, an IPC round trip, and daemon admission for a checkpoint that can never attribute anything.
  • Classify tool_name up front and return no events for ToolClass::Skip, mirroring how every other agent preset already routes through classify_tool.
  • Payloads without tool_name (legacy Claude versions) keep the historical treat-as-file-edit behavior.
  • NotebookEdit is added to Claude's FileEdit set so notebook edits keep checkpointing (previously it fell through to the same catch-all as Write/Edit; with Skip semantics it would have silently lost attribution).

Test coverage

  • test_claude_ignores_read_only_and_unsupported_tools: pre+post hooks for Read/Glob/Grep/Task/UnknownTool produce no events.
  • test_ignored_claude_hook_produces_no_checkpoint_requests: end-to-end through the orchestrator.
  • Existing tests updated where they relied on unknown tools being treated as file edits.
  • Full integration suite: two runs, 3,256/3,256 and 3,255+1 environmental flake (passes 5/5 solo) on the stack tip.

Ported from #1979 (closed) onto current main. Solo-mergeable.

🤖 Generated with Claude Code

…ools

The Claude preset produced pre/post checkpoint requests for every hook
invocation, including read-only tools (Read, Glob, Grep, Task) and
unknown tools, treating anything that wasn't Bash as a file edit. Each
of those requests cost hook parsing, transcript handling, an IPC round
trip, and daemon admission for a checkpoint that can never attribute
anything.

Classify the hook's tool_name up front and return no events for
ToolClass::Skip, mirroring how every other agent preset already routes
through classify_tool. Payloads without tool_name (legacy Claude
versions) keep the historical treat-as-file-edit behavior. NotebookEdit
is added to Claude's FileEdit set so notebook edits keep checkpointing
(it previously fell through to the same catch-all as Write/Edit).

Ported from #1979 (closed) onto current main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@svarlamov
svarlamov merged commit 8ff2f0d into main Jul 29, 2026
36 checks passed
@svarlamov
svarlamov deleted the feat/claude-skip-readonly-hooks branch July 29, 2026 16:03
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.

1 participant