Skip to content

orchestration: worker readiness fails with terminal_handle_stale before Task injection #29

Closed

Description

@DoozyX

Related closed issue: #1. This is a new readiness failure on the current build, with terminal_handle_stale rather than the old timeout; a shared root cause is not established. Open issues #18/#19 concern the different dispatch_input/agent_not_in_foreground boundary.

Original direct Python subprocess argv was retained. Exact command shape below preserves every flag and public value; private spec, placement, run and sender values are explicitly redacted, not an executable reproduction:

orca orchestration worker-start --spec <REDACTED-read-only-final-audit-spec> --worktree id:<REDACTED-repo-id>::<REDACTED-existing-worktree-path> --agent codex --model gpt-6-luna --task-title "Final delivery teardown" --run <REDACTED-run-id> --from <REDACTED-coordinator-terminal> --json

Expected: create the configured worker, observe readiness and inject its Task. Actual retained launch receipt: state=failed, stage=agent_readiness, failedStage=agent_readiness, lastError=terminal_handle_stale; effective agent/model remained codex/gpt-6-luna, setup not_applicable, mode terminal/user_default. Effects/residualResources name one newly created visible agent terminal. The recovery text explicitly says the terminal never ran the Task and directs worker-release for that failed Dispatch.

Read-only verification command orca orchestration request-show --request 59fe1e17-2a62-4bb6-9c24-a6802cbc3054 --json returned state completed, method orchestration.workerStart and the same failed receipt. This is positive startup failure, not an inference from an empty wait. A simultaneous independent retrospective startup succeeded; concurrency as cause is UNKNOWN. Coordinator followed receipt-directed release and reserved a same-Task --retry-of in the same placement; that retry became ready. This does not prove a root-cause fix.

orca --version: 1.4.224-local.1791867729613.bead8bb910ae.

Relevant recovery guide rule: “A worker-start that failed before its agent was ready still owns the terminal it created.” No guide defect is alleged.

Local retrospective: .orca/2026-10-13-three-ui-stories/orchestrate/retrospective.md; retained initial argv and failure receipts beside it are teardown-initial-argv.json and launch-teardown.json. No private target source, provider URLs or credentials are included.

Activity

  1. added
    retro
    on Oct 13, 2026
  2. added
    retro-in-progress
    on Nov 13, 2026
  3. DoozyX commented on Nov 13, 2026

    @DoozyX
    OwnerAuthor

    Claimed by an automated retro run (coordinator terminal term_5972af22-ae50-4544-b81e-37e321c8a87d, local host, Claude Code). Planned worktree .worktrees/retro-issue-29, branch DoozyX/retro-issue-29-terminal-handle-stale. No Orca Run/Dispatch yet. Evidence/run report: .orca/2026-11-13-retro-issue-29/run-report.md in the root worktree of the local checkout. Next: SAFE/BLOCKED classification of this body, then implementation.

  4. added
    retro-parked
    on Nov 13, 2026
  5. DoozyX commented on Nov 13, 2026

    @DoozyX
    OwnerAuthor

    Needs attention: fix is implemented, reviewed clean, and open as a draft PR; landing is blocked by the local visual-proof hook.

    • Draft PR: fix(orchestration): follow a reminted pane handle during worker readiness #54 (Fixes #29, base main, head DoozyX/retro-issue-29-terminal-handle-stale @ f1d9d64e8eb). It is mergeable and no CI checks are reported.
    • Root cause (code trail, not live-reproduced): the orchestration: worker readiness fails with terminal_handle_stale before Task injection #29 fix fe79e4d7be3 was dropped by upstream merge de99ccca9e5, leaving waitForWorkerAgentReadyRebinding uncalled. The PR re-wires it for the local worker start (with custody rebind) and for federationAttachStart (same bug, per coordinator decision D1).
    • Review: 2 independent full-branch rounds. Round 1 fix-needed (a failing quality gate plus the remote sibling), fixed in f1d9d64e8eb; round 2 clean (patch=0, nit=3, defer=1). Gates on the final head: pnpm tc exit 0, scoped tests 2814 passed, ORCA_CODE_QUALITY_BASE=4ecd5364fe9 pnpm check:changed --force 26/26.
    • Blocker: gh pr ready / merge is denied by ~/.claude/hooks/pr-visual-proof-gate.py, which diffs against origin/main (upstream) and wrongly flags UI files; the PR's real files are 5 backend files. Not bypassed and no waiver added. Recovery: fix the hook to diff against the PR's own base, or approve a visual-proof waiver, then gh pr ready 54 --repo DoozyX/orca and squash-merge after confirming checks.
    • Owners: implementer, 2 reviewers and classifier were native subagents, all idle/finished; no Orca Run/Dispatch was created.
    • Preserved: worktree .worktrees/retro-issue-29 (clean), branch above (pushed to fork), run dir .orca/2026-11-13-retro-issue-29/ in the root worktree (report, ledger, findings, deferred.md, pr-body.md).
  6. removed
    retro-in-progress
    on Nov 13, 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

    retroretro-parked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions