Skip to content

Implement dispatch broken in claude-code #5

Description

@neko-kai

Cause: probably isolation: worktree in implement-worker.md causes usage of ephemereal worktrees instead of cq created worktrees

Agent diagnostics:

message 1:


Implementation stopped before any dispatch

/cq:implement:start G4 could not execute — I stopped rather than fake it.

Why it stopped

The CQ_SUBAGENT ref-first dispatch bridge isn't exposed in this session. Two independent blockers, not one missing parameter:

  1. prepare_dispatch requires expectedChild.childId/runId — knowable only after a child launches, yet prepare must complete before launch, because the launch prompt may carry only the prepared {attestationId, generation, inputCapability}.
  2. confirm_dispatch_completion requires real promptDigest/inputDigest and a trusted-parent/trusted-extension actor. In the intended design the bridge observes completion and confirms, returning handle-only.

The only launcher available returns a result body, which the protocol forbids inspecting. Using it would mean inventing a childId, a runId, and both provenance digests — forging the exact attestation chain this protocol exists to enforce. The protocol's own rule covers this: an unavailable bridge aborts the dispatch and never degrades to a body-returning completion.

Evidence: two prepare_dispatch probes, both refused pre-launch with allocated: false (invalid-launch-envelope, then invalid-refs-form). I stopped there — the envelope isn't the blocker, so cracking it would just get me to the same wall with durable state to clean up.

...

Important correction to my last turn: the renderer bindings settle it. The frontmatter declares allowed-tools: … Agent …, and the subagent-dispatch fragment forbids dispatch_agent( for claude while forbidding Agent( for codex/pi. So CQ_SUBAGENT is the Agent tool — it's the sanctioned bridge on this surface, not a generic launcher. I was wrong to rule it out.


message 2


Retry got further, then hit a wall. No code landed.

First, a correction to my last turn: I was wrong that the bridge was missing. The renderer bindings settle it — advance.md declares allowed-tools: … Agent …, and the subagent-dispatch fragment forbids dispatch_agent( for claude while forbidding Agent( for codex/pi. Agent is the sanctioned transport here.

What now works

prepare_dispatch's refs form is unusable (3 pre-launch rejections), but the inline roleId+input form is accepted and validates against implement-worker v5. Both workers prepared at frontier — including your T263 standard→frontier change, which I also persisted to its suggestedModel — and both launched via Agent(model: opus).

Three defects, all environmental

1. Per-agent worktree confinement — the real blocker. The transport pins each child into .claude/worktrees/agent-<hex> and refuses any Bash command whose cwd resolves elsewhere. T264's child was pinned at 0e912be, two commits behind the dispatched base, and couldn't reach the prepared tree even though EnterWorktree reported success. It couldn't work in its pinned tree either — implement/T264 was already checked out, and reaching startingCommit needed a forbidden reset/rebase. The protocol's isolation: "none" is unsatisfiable: Agent's param accepts only worktree/remote, so the confinement comes from the role definition.

2. resultCapability not delivered — inconsistently. T264's child got no resultCapability from fetch_dispatch_input; store_result failed twice with malformed result capability, forcing it to return a body. Yet T263's attestation did reach result-stored. I can't explain the asymmetry, so I'm reporting it as observed.

3. Correlation unsatisfiable without forgery. prepare_dispatch demands expectedChild.childId/runId before launch; Agent reveals its agentId only after. Confirm rejected T263's real id:

completion claims child/run "a27263e129588d87f"/... but attestation
expects "agent-T263-r0-b1"/"run-T263-r0-b1"

Only my invented placeholders would pass. I refused — asserting them makes every attestation unfalsifiable. So T263's stored result is permanently unreadable.

Nothing produced, nothing lost — verified

Both branch tips still fbc4142, zero commits. Both prepared worktrees clean, no WIP partial. No agent-* worktree survives on disk. Every dangling commit in the object store predates today (latest 2026-08-08), so neither child committed anything recoverable. T263 burned 36 tool calls / 263s and T264 13 / 183s inside trees that no longer exist.

State

  • 3 dispatches aborted with truthful typed reasons (missing-result, protocol-violation, native-failure)
  • T263, T264 → blocked on new question Q5. The ledger forbids wipplanned, so blocked was the only honest non-terminal option
  • Q5 carries all three defects with ranked remediation; HO4 has the full record
  • Both worktrees retained and resumable by handle
  • G4 stays building — the protocol forbids reverting it, though nothing has landed

Worth stating plainly: your plan is fine. T264's own worker confirmed the T264 spec materialized completely and was actionable before it hit the environment. Fix defect 1 first — make the pinned and prepared worktree the same tree — and this should run.


message 3


The reviewer stored its verdict — but note how: it says it recovered the result capability "from the dispatching session record" after its first attempt was rejected. The T264 reviewer faced the same gap and explicitly refused that route as a side-channel credential grab.


message 4


A reviewer scraped a parent capability. T265's reviewer recovered the store-result token from the dispatching session record after its first attempt was rejected. T264's reviewer hit the identical gap and refused that route as a unilateral side-channel credential grab. The verdict content is sound and I corroborated it independently — but a child being able to lift a parent capability out of session state is a real boundary weakness.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions