Skip to content

[Bug]: opencode/antigravity workers never receive the dispatch prompt or capability; a reviewer took over the coordinator binding #24913

Open

Description

@mycoms01

Operating system

macOS (Darwin 25.6.0)

Orca version

1.4.218

Details

While coordinating a supervised orchestration run (coordinator = Claude Code; implementers = codex and antigravity; reviewers = opencode), several problems repeated across ~30 dispatches in one Run.

1. Prompt injection does not land in opencode (and once in antigravity)

  • orchestration worker-start --agent opencode returns ok: true with prompt.stages: ["input_accepted", "turn_started"], but the opencode TUI shows an empty input box and never starts a turn. This happened on every opencode dispatch.
  • It also happened once with --agent antigravity: the agent only saw the "You have 1 orchestration message" notice, not the task prompt.
  • codex dispatches were not affected.
  • Workaround: orchestration dispatch-show --task <id> --preamble, write the preamble to a file, then terminal send --text "read <file> and follow it" --enter.

2. Workers cannot get their dispatch capability, so every lifecycle message is rejected

  • When the prompt is delivered through the workaround above, the preamble returned by dispatch-show --preamble has no --dispatch-capability value.
  • Result: every worker_done, heartbeat, ask and escalation from those workers is rejected with dispatch_capability_invalid ("The Dispatch capability is missing" / "is invalid" / "is revoked").
  • The coordinator has to read the verdict out of the rejected message, then settle by hand (worker-stop → often stop_unknown → worker-abandon → task-update --status completed).
  • Expected: either injection works, or there is a supported way for the coordinator to re-deliver a full preamble including the capability.

3. A reviewer worker became the Run's coordinator

  • Mid-run, run-show reported coordinator_handle = the opencode reviewer's terminal (consumer_generation went 1 → 2). From then on the real coordinator got consumer_fenced on worker-start, check --ack and task-update.
  • This happened after the reviewer had repeated worker_done rejections (problem 2) and was trying to report.
  • Recovered with orchestration run-use --id <run> from the original coordinator terminal.
  • Expected: a dispatched worker terminal must not be able to (re)bind itself as the coordinator of the Run it works in.

4. Workers read Orca's internal state to look for the capability

  • After the rejections, two different workers (antigravity once, opencode once) searched ~/Library/Application Support/orca/ (terminal history) and queried orchestration.db with sqlite3 SELECT to look for the capability. One reported seeing capability_hash there.
  • Reads only, as far as we could see, but the agents treat local Orca state as reachable when the documented path fails.
  • Fixing problems 1 and 2 would likely remove the incentive. Consider whether the DB and terminal history should be readable from worker terminals at all.

5. Smaller items

  • worker-stop on an idle-but-live opencode/codex terminal frequently returns stop_unknown, and a retry fails with dispatch_inactive. Only worker-abandon settles it, and the terminal stays open.
  • worker-release sometimes returns "state": "retained" for a dispatch that had earlier been retained and was then settled.
  • Abandoned reviewers keep sending heartbeats and status messages with a revoked capability. These land in the coordinator inbox and wake check --wait.

Repro outline

  1. orchestration run-create
  2. worker-start --spec "<task>" --worktree path:<repo> --agent opencode --json
  3. Observe the opencode TUI: input empty, no turn.
  4. dispatch-show --task <id> --preamble → no capability in the text; deliver it via terminal send.
  5. Worker finishes → its worker_done is rejected with dispatch_capability_invalid.

Activity

  1. leovibecoder commented on Oct 7, 2026

    @leovibecoder

    Same missing-capability symptom reproduced on Orca 1.4.217, WSL2 (Ubuntu) with OpenCode v2.0.24, --agent opencode2, over 4 consecutive supervised workers (2026-10-06/07).

    Every run

    • worker-start --spec ... --worktree id:<repo-id>::\\wsl.localhost\Ubuntu\... --agent opencode2 --json returns state: ready, stage: input_accepted, turnStart: unsupported, prompt.provider: unsupported.
    • The composer stays empty (placeholder visible), so the prompt is not submitted. dispatch-show --task <id> --preamble + terminal send --text <bracketed-paste preamble> --enter gets it delivered.
    • dispatch-show --preamble output contains no --dispatch-capability. The preamble's send --from <handle> --type worker_done ... --task-id ... --dispatch-id ... is rejected with The Dispatch capability is missing. Pass --dispatch-capability <token> from your dispatch preamble. Heartbeats and --type escalation are rejected the same way.
    • The rejection relay works: the coordinator mailbox receives Rejected worker_done: ... with the original body. We now use that, plus waiting for the worker's PR, as the completion signal.
    • Afterwards task-update --status completed is refused (task_not_startable), and worker-stop lands in stop_unknown (cannot stop from stop_unknown). Only worker-abandon + terminal close closes the worker.

    Possibly related
    A worktree created with plain git worktree add (not orca worktree create) has no projectId. The worker's terminal is reported orphaned: true (paneRuntimeId: -1) and never appears on the Agent Dashboard. With orca worktree create, it is attached and visible. Prompt delivery and the missing capability are the same in both cases.

    Happy to run a debug build or capture more receipts if useful.

  2. nwparker commented on Oct 24, 2026

    @nwparker
    Contributor

    Thanks for the report! The OpenCode half should be fixed in newer builds. Please retest on 1.4.239+ and tell us whether OpenCode and antigravity workers still miss the dispatch prompt and capabilities. Include Orca version, OS, and versions of the agents. If it still fails, the coordinator-binding behavior is better tracked separately. Please redact anything private before sharing; screenshots or log excerpts are fine.

  3. nwparker commented on Nov 6, 2026

    @nwparker
    Contributor

    Thanks for the report. We couldn't reproduce this on the current build, and several related fixes have landed since. Could you retest on the latest Orca and, if it still happens, reply with: OS + Orca version + agy --version, minimal steps to reproduce, and any relevant logs/screenshots? We'll close this as insufficient information in 14 days if we don't hear back.

  4. added
    pending_reproRepro attempted; still pending conclusive reproduction
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending_reproRepro attempted; still pending conclusive reproduction

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions