Skip to content

worker_done leaves dispatch lock active; re-dispatch to same terminal fails silently #6090

Closed

Description

@zaridan

Summary

A worker's worker_done completion signal does not release the dispatch lock on its terminal. The task stays open (still owns the terminal), so a later orca orchestration dispatch --to <sameTerminal> is rejected with Terminal … already has an active dispatch (…). The rejection is easy to miss — it lands in a truncated JSON tail — so the new task sits at status: ready, never injected, and the worker idles indefinitely.

Behavior

  • Worker completes task A, emits worker_done.
  • Coordinator dispatches follow-up task B to the same worker terminal.
  • Dispatch returns Terminal … already has an active dispatch (…) because task A still holds the lock (completion signal ≠ task closed).
  • In practice the error is silent (truncated tail) → task B stuck ready, worker idle.

Repro

  1. Dispatch task A to a worker terminal with --inject.
  2. Worker finishes and emits worker_done.
  3. Dispatch task B --to the same terminal.
  4. Observe the rejection and task B stuck at status: ready.

Workaround

Explicitly close the prior task, then re-dispatch:

orca orchestration task-update --id <taskA> --status completed
orca orchestration dispatch --task <taskB> --to <sameTerminal> --inject --json

Suggested fix (maintainers' call)

Either:

  • auto-close (or release the dispatch lock for) a task when its worker emits worker_done; or
  • surface the dispatch rejection loudly (non-truncated, clearly an error) so coordinators can't miss it.

Activity

  1. zaridan commented on Jun 22, 2026

    @zaridan
    ContributorAuthor

    Related: the orcastrate coordinator spec now documents this gotcha + the task-update --status completed workaround as a guardrail — see PR #6036 (commit 3ae397d). That's a behavior-neutral doc note; the underlying fix (auto-close on worker_done vs. surfacing the dispatch rejection loudly) is still this issue's call.

  2. Jinwoo-H commented on Jun 25, 2026

    @Jinwoo-H
    Contributor

    will be in next release, usually within 24 hours

  3. added theissue type on Jul 12, 2026
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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions