Repository navigation
fix: skip uv for Claude Code worker tool batches - #4627
Merged
Merged
Conversation
Move the existing worker-batch exclusion into a predicate shared by the standalone hook gate and cmd_hook. A page-owning parent no longer makes an ignored worker batch start uv and import Leaf. The launcher regression fails before the change and passes after it; parent batches, prompt hooks and other harnesses still reach uv. Focused hook and delivery checks: 52 passed. Refs #4549
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.
Claude Code worker tool batches name the parent session, so a parent holding a page made the launcher start uv before
cmd_hookdiscarded the worker batch. The standalone gate now makes that decision before uv starts, using the same predicate as the full hook. Parent batches keep their existing delivery path.The launcher regression fails before this change and passes afterward. It substitutes a failing uv executable to prove worker batches never invoke it, with parent-batch, prompt-hook and other-harness controls that still do. The focused hook checks passed: 52 tests across
tests/model/test_hooks.py,tests/process/test_hook_gate.pyand the registered delivery test. Ruff, Python compilation and shell syntax checks passed. Native harness journeys remain unverified; this runner has no Claude Code executable.This implements the report's worker-batch interim improvement. Parent-session empty batches still run the full hook; replacing polling with prompt-watch delivery, handling late Stops and changing SessionStart scheduling remain outside this change. No latency reduction is claimed for those paths.
Refs #4549 — automated triage