Skip to content

[Bug]: local worker-start stalls at dispatch_input before lifecycle preamble; release can end in tab_not_found #15920

Open

Description

@aprudkin

Summary

On macOS, a local supervised worker-start can create the agent terminal but fail before delivering the injected lifecycle preamble. The Dispatch then fails at dispatch_input with agent_prompt_stalled, its capability is revoked before worker_done, and subsequent worker-release can remain release_unknown with tab_not_found.

This was reproduced twice in Orca 1.4.188: once before and once after a complete manual app relaunch (new runtime epoch). The in-app updater reported that this was the latest version.

Reproduction

  1. Use a local, existing non-main worktree.
  2. From a local coordinator, create a Run and a ready Task.
  3. Start a fresh Codex worker with the public lifecycle path:
orca orchestration worker-start --task <task-id> --worktree <existing-worktree> --agent codex --json
  1. Inspect the Dispatch and then release the exact settled worker:
orca orchestration dispatch-show --task <task-id> --json
orca orchestration worker-release --dispatch <dispatch-id> --json

Actual result

  • worker-start returns a structured receipt with state: failed, stage: dispatch_input, and lastError: agent_prompt_stalled.
  • The agent terminal is listed as a residual resource, but the Dispatch has capability_revoked_at and fails before any worker heartbeat or worker_done.
  • On the second reproduction after relaunch, worker-release returned state: release_unknown, lastError: tab_not_found. The documented idempotent retry returned the same result.
  • worker-show then reported the exact worker terminal as disconnected and non-writable, with exitCause: operator_close; no manual terminal input or broad terminal close was issued by the reproducer.

Expected result

A fresh local worker-start should deliver a valid lifecycle capability and preamble, allowing the worker to report worker_done. If startup fails after terminal creation, the exact worker-release path should settle the owned terminal without tab_not_found or release_unknown.

Scope / related reports

This is a local macOS reproduction, not a federated/WSL case. It may be related to persisted-tab desynchronization, but it is not the same entry point as:

The failure here originates at lifecycle dispatch input during worker-start, before a valid worker lifecycle can begin.

Safety

The reproduction used only documented orchestration commands. It did not edit repository files, delete worktrees/branches, restart the runtime programmatically, or inject terminal input to bypass lifecycle.

Activity

  1. rossinsilico commented on Aug 22, 2026

    @rossinsilico

    Adding another macOS reproduction from a multi-agent Codex run. This closely matches the lifecycle failure reported here, with one potentially important variation: the workers appeared to be actively running even though Orca classified prompt submission as stalled.

    Observed sequence:

    • The Orca runtime restarted at approximately 13:08 local time, changing its runtime ID. During the transition, a worker launch briefly reported that the app/runtime was unavailable.
    • Two subsequent Codex worker launches using our Luna worker profile were marked agent_prompt_stalled after roughly 15 seconds.
    • In both cases, the created terminal was visibly active: the agent was reading its installed skills, had received the task context, and was beginning work.
    • Orca nevertheless marked the Dispatch failed and revoked its lifecycle capability. The worker could continue reading and editing the repository, but could no longer report completion normally through worker_done.
    • Releasing the first failed Dispatch returned tab_not_found, leaving lifecycle cleanup uncertain even though the terminal transcript had been captured.
    • We retained the currently active worker terminal and supervised its transcript and repository changes directly rather than restarting it again.

    We found no corresponding repository or task failure. The failure was in Orca’s orchestration-control state: the terminal and agent were alive and making progress while the Dispatch had already been failed and fenced.

    This suggests that at least some agent_prompt_stalled cases may be false negatives in turn-start verification, rather than the prompt actually failing to reach or start the agent.

    A useful recovery path would be a safe way to reattach or re-mint lifecycle authority for a terminal that is demonstrably active after a false agent_prompt_stalled, without closing the terminal or discarding its in-context work.

    We can provide sanitized JSON receipts, timestamps, runtime IDs, terminal/Dispatch IDs, and transcript excerpts if they would help isolate the verification or cleanup path.

  2. kevinblade commented on Aug 26, 2026

    @kevinblade

    Adding a contrasting macOS 1.4.188 reproduction that isolates the release path from the agent_prompt_stalled startup failure.

    Environment:

    • macOS, local Orca desktop 1.4.188
    • runtime ID 67968bfe-cdb5-41a1-93b3-7ac286b77347
    • normal supervised Codex worker, CLI 0.149.1

    Sequence:

    1. worker-start succeeded for a fresh local Codex worker (task_2588f418bb11, Dispatch ctx_0814554f742e, terminal term_572a7d03-adc8-455f-8dfc-427d63cfaddc).
    2. The worker accepted input, emitted a heartbeat, and sent an accepted typed worker_done (msg_136f10760f61). There was no startup stall or failed lifecycle capability.
    3. Immediately before release, worker-show proved the exact owned terminal was live, connected: true, writable: true, exactWorker: true, with tab bb2043ff-68ae-4a97-a027-593edfb7646d and leaf be401e22-d748-4b52-a74a-cf833ad50adc. The resource release state was not_requested.
    4. The first exact worker-release --dispatch ctx_0814554f742e captured the transcript but returned state: release_unknown, lastError: tab_not_found, processAction: none.
    5. Following the receipt exactly, worker-show was repeated and worker-release was replayed with the original retry request 6b748a16-c131-482c-b32c-745d0cb2f4f5. The mutation was recognized as replayed/idempotent and returned the same result. No broad terminal close was substituted.
    6. The post-release observation showed the terminal exited with operator_close, but the owned terminal resource still had releaseState: unknown, releaseCompletedAt: null, and releaseError: tab_not_found.

    Expected: after an accepted worker_done, releasing the exact owned terminal should durably settle as a known disposition.

    This suggests tab_not_found/unknown settlement is not limited to the dispatch_input failure described in the issue body: it also occurs after a fully successful lifecycle, even when the exact tab/leaf is resolvable immediately before release.

    The in-app updater was checked again on 2026-08-26 and reported 1.4.188 as the latest version. Full sanitized evidence is recorded here: https://github.com/kevinblade/convexa/blob/main/docs/releases/development-gate1-settlement-reproduction-2026-08-26.md

  3. hierosir1984 commented on Aug 26, 2026

    @hierosir1984

    Linux confirmation of the release path on Orca 1.4.188, independent of startup failure.

    A supervised Codex worker reached input_accepted, sent an accepted typed worker_done, and completed normally. The exact worker terminal was coordinator-owned. worker-release captured its attested transcript, closed the terminal, then returned release_unknown with tab_not_found. The required same-request retry returned the same result. worker-show afterwards reported the terminal exited with operator_close while the resource remained releaseState unknown.

    The worker-start receipt contained the warning that the background terminal was running but Orca could not make it discoverable. The packaged closeTerminal implementation still followed the pty.tabId plus notifier.closeTerminalTab branch. It awaits the UI tab close before calling stopExplicitlyClosedTabPtys. When the undiscoverable background tab produces tab_not_found, completeWorkerTerminalRelease catches that exception and records release_unknown even though the terminal has already disappeared.

    The smallest safe correction is to treat tab_not_found from the UI close as an absent UI surface, then continue the exact owned PTY stop and liveness verification. Settlement should become released only when the addressed PTY is proven stopped or already exited. This preserves the existing fail-closed rule without leaving successful workers permanently counted as release_unknown.

  4. kevinblade commented on Aug 27, 2026

    @kevinblade

    Retested the successful-lifecycle release case after updating to Orca 1.4.190; the issue still reproduces on a new runtime epoch.

    Environment:

    • macOS, local Orca desktop 1.4.190
    • runtime ID 775575d0-fb81-474a-85e7-2c514cdf1714
    • Codex 0.149.1, Apps stable/enabled true

    Fresh comparison run:

    • Run run_7ea615f21867
    • Task task_294f7517b483
    • Dispatch ctx_da4870d3c492
    • terminal term_b28195d7-a2ee-439f-8d7a-d7a2872fdedd

    The worker again completed the normal path: input_accepted, heartbeat msg_9e5f48a9bce4, accepted typed worker_done msg_ec826a7e6b0e, Dispatch completed/succeeded. Immediately before release, worker-show reported the exact owned terminal live, connected and writable, with tab 6009e2f1-2632-4a82-94b7-62fd92561a3a, leaf 94895a14-42ac-48b7-92ea-22f9e3314531, exactWorker: true, and releaseState: not_requested.

    The first exact worker-release captured the transcript but returned:

    state: release_unknown
    lastError: tab_not_found
    processAction: none
    

    Following the receipt exactly, I inspected the same Dispatch and replayed release with mutation request c64ec234-3a5b-4bee-a920-7b339530c788. Orca recognized it as an idempotent replay and returned the same result. The post-release worker observation was exact/exited with operator_close, but the owned resource still had releaseState: unknown, releaseCompletedAt: null, and releaseError: tab_not_found. No broad terminal close was substituted.

    This is the same contrasting path as my previous comment: no agent_prompt_stalled and no lifecycle failure before settlement. The app version and runtime epoch both changed from the 1.4.188 reproduction, but exact owned-terminal release remains unknown.

  5. wonjo-linc commented on Aug 30, 2026

    @wonjo-linc

    Adding a Windows-hosted local WSL reproduction on Orca 1.4.192. This is the successful-lifecycle release path, not an agent_prompt_stalled result.

    Environment:

    • Orca desktop 1.4.192
    • local Ubuntu WSL worktree imported through Orca
    • Codex CLI 0.151.0
    • empty-commit disposable Git repository with no project hook, AGENTS.md, setup script, or product files

    Sequence:

    1. A one-time fresh-directory trust prompt was handled in a separate readiness terminal. That failed Dispatch was not counted.
    2. A new supervised Codex worker then started successfully with state=ready, stage=input_accepted, and hookFound=false.
    3. The worker sent one accepted typed worker_done with outcome=succeeded; the Task and Dispatch settled as completed/succeeded. The coordinator immediately verified the message identity, archived output, and clean unchanged Git HEAD.
    4. Immediately before release, worker-show reported the exact coordinator-owned terminal live with exactWorker=true, ownershipState=owned, and releaseState=not_requested.
    5. Exact worker-release captured the archive and closed the agent terminal, but returned:
    state: release_unknown
    processAction: closed_agent_terminal
    lastError: The agent terminal was closed but its process could not be confirmed stopped: the stop outcome could not be verified.
    
    1. A follow-up worker-show reported the same exact process incarnation as status=exited, exactWorker=true, terminal disconnected/non-writable, exitCause=stop_unverified, and paneRuntimeId=-1. The terminal resource still remained ownershipState=owned, releaseState=unknown, with no releaseCompletedAt.
    2. Replaying worker-release with the original retry request was recognized as replayed=true and returned the same release_unknown result.
    3. The final exact worktree terminal list was empty. The Orca project setup was removed through project setup-delete, and the clean disposable root was moved to trash. None of those observations were treated as a substitute for raw released settlement.

    This confirms that the successful worker lifecycle release problem still reproduces on 1.4.192 in local WSL. The observable variant differs from the earlier tab_not_found/processAction=none reports: here Orca reports processAction=closed_agent_terminal, the exact process is subsequently observed exited, but the resource ledger remains release_unknown because the stop verdict is unverified.

    Sanitized local identifiers, paths, runtime IDs, and Dispatch capability material are intentionally omitted. I can provide additional sanitized receipt fields if useful.

  6. wonjo-linc commented on Aug 30, 2026

    @wonjo-linc

    One additional bounded comparison on the same Orca 1.4.192 local WSL profile: I tested the documented worker-stop before worker-release as a materially different settlement sequence.

    A fresh hookless supervised Codex worker again reached input_accepted, sent an accepted worker_done, and settled completed/succeeded with a clean unchanged fixture. After the coordinator graded the result, worker-stop --dispatch <completed-dispatch> returned:

    state: succeeded
    alreadySettled: true
    processAction: none
    

    The exact owned terminal remained live. The following exact worker-release again returned release_unknown with processAction=closed_agent_terminal; follow-up observation was exact/exited and the resource ledger remained owned/unknown.

    So worker-stop is not currently a workaround once worker_done has already settled the Dispatch. It treats the logical Dispatch as already settled and does not establish a process stop verdict for the still-owned terminal before release.

  7. tbeugin-ext commented on Sep 1, 2026

    @tbeugin-ext

    Linux confirmation on the latest published desktop release, Orca 1.4.194. This is the successful-lifecycle path, not an agent_prompt_stalled startup failure.

    Environment:

    • Ubuntu 26.04.1 x86_64, headless AppImage runtime (serve), normal user
    • Orca 1.4.194
    • Codex CLI 0.152.0
    • supervised Codex worker created with the public orchestration lifecycle

    Observed sequence:

    1. worker-start reached state=ready / stage=input_accepted.
    2. The worker completed normally and emitted an accepted typed worker_done; its Task and Dispatch settled as completed/succeeded.
    3. Exact worker-release --dispatch <dispatch> --retry-request <stable-request> captured the transcript and removed the visible worker surface, but returned:
    state: release_unknown
    processAction: none
    lastError: tab_not_found
    
    1. Replaying the exact same release request was recognized as idempotent (mutation.replayed=true) and returned the same release_unknown result.
    2. Post-release resource accounting remained ownershipState=owned, releaseState=unknown, releaseError=tab_not_found, although the worker itself was settled and its visible tab was no longer available.

    Impact in a durable FIFO consumer: the oldest Delivery cannot be acknowledged safely because release never reaches a documented terminal disposition. A later independent worker_done in the next Delivery is therefore blocked behind it. We deliberately did not substitute a broad terminal close or fabricate an acknowledgement.

    Expected: exact owned-worker release should converge to released (or a documented retained disposition) once the addressed PTY is proven stopped or absent, and an exact replay should expose that terminal accounting.

    I also checked the published release history before reporting this: 1.4.194 is currently the newest desktop release, and neither its notes nor 1.4.193 include this fix. Open PR #16515 explicitly describes a headless cleanup correction for the same worker_done -> worker-release -> release_unknown -> tab_not_found path, but it is not merged or released yet.

  8. wrightbuilt commented on Sep 2, 2026

    @wrightbuilt

    macOS confirmation on Orca 1.4.194, successful-lifecycle path, plus two behaviors I have not seen in this thread yet: what a retried release does to the ledger, and what worker-abandon says.

    Environment: macOS (Darwin 25.6.0), local runtime, Orca desktop 1.4.194, supervised Codex and Claude workers started with the public lifecycle (worker-start, accepted typed worker_done).

    Scale. worker-list --json on this workstation before cleanup: { "release_unknown": 35, "released": 17, "retained": 8, "active": 4 }. All 35 unknown rows share the shape already described here: workerState=succeeded, dispatchStatus=completed, archive.status=captured, releaseError=tab_not_found, terminal handle absent from terminal list. They accumulated across four coordinators over about ten days.

    Retrying release changes the row, but not to released. A second exact worker-release on a release_unknown / tab_not_found row returns:

    { "state": "retained", "reason": "identity_unproven", "processAction": "none",
      "archive": { "source": "transcript", "status": "captured" } }

    and worker-list then shows releaseState=retained, retainedReason=identity_unproven. Reproduced on 18 of 18 rows. So the retry is not a no-op: it silently converts an unknown release into something indistinguishable from a deliberate worker-retain, which makes the ledger harder to audit, not easier.

    worker-abandon refuses a settled dispatch.

    dispatch_inactive: Dispatch <id> already succeeded and cannot be abandoned.
    

    Combined with the above, a coordinator has no command that settles a completed dispatch whose tab is already gone, and no command to close a Run whose coordinator terminal is gone. #13860 described the same dead end for external_terminal; on 1.4.194 a release of a dispatch whose terminal was launched by worktree create --agent still returns retained / external_terminal.

    Expected, same as above: once the addressed PTY is proven absent, exact release should converge to released (or a documented terminal disposition), and a replay should be a no-op rather than a state change. Happy to supply sanitized receipts.

  9. haden111 commented on Sep 4, 2026

    @haden111

    Independent confirmation of the failed-start / cleanup problem from our Windows development workflow.

    We had worker-start failures around dispatch_input / prompt delivery where the attempted worker had already created Orca resources. Recovery then became another failure mode rather than a reliable cleanup operation.

    In particular, we encountered the same family of outcomes described here:

    • initial worker/Dispatch startup fails;
    • lifecycle capability has already been revoked or the worker state is unusable;
    • cleanup/release does not reliably settle the exact resource;
    • subsequent state can end up effectively unknown rather than cleanly released.

    release_unknown / missing-tab-style outcomes are especially problematic for unattended orchestration because the coordinator cannot safely answer either:

    • “this resource is gone”, or
    • “this resource still exists and I own it”.

    We eventually stopped using Orca as the primary development orchestrator because failures like this required human inspection and recovery of terminals/worktrees.

    I have not yet rerun this exact reproduction on 1.4.196, so this is independent historical impact evidence rather than a claim that every detail still reproduces on the latest tag.

    The contract we need is simple: if worker-start partially creates resources and then fails, an idempotent release of the exact Dispatch must eventually produce a definite terminal result: released, already released, or an actionable error explaining what still owns the resource. release_unknown is not sufficient for unattended recovery.

  10. added
    bug
    os:macos
    on Sep 19, 2026
  11. added theissue type on Sep 19, 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

    buggitorchestrationos:macos

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions