Skip to content

fix: skip uv for Claude Code worker tool batches - #4627

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-4549
Oct 28, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-4549

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Claude Code worker tool batches name the parent session, so a parent holding a page made the launcher start uv before cmd_hook discarded 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.py and 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

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
@leaf-agent
leaf-agent merged commit 3427806 into main Oct 28, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4549 branch October 28, 2026 17:46
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