Skip to content

Orchestration: intermittent agent_not_in_foreground at ready worker startup #19

Open

Description

@DoozyX

Historical intermittent worker startup refusal at dispatch_input despite ready observations; owner reports recovery, not a lasting defect. No fresh reproducer or source investigation was run for this filing.

Expected: the authorized existing Task starts when the recognized Codex agent is ready. Actual: two historical retries failed at dispatch_input with agent_not_in_foreground; readiness observations in the diagnosis were Ready, empty Codex prompt, recognized identity, and satisfied tui-idle.

Historical command structure (private worktree path explicitly REDACTED; all other shown arguments are literal historical fields, not a claim that this redacted command is an exact executable reproducer):

orca orchestration worker-start --task task_7513a7987ccb --retry-of ctx_d84720c2dbca --worktree path:<REDACTED-existing-source-worktree> --agent codex --model gpt-6.1-sol --effort high --run run_75faecf29fb7 --from term_1429442a-2e01-482a-b299-56ff1a43d782 --json

Second retry changed only --retry-of to ctx_c6e7f8bb4a09. Receipt fields:

  • First retry: ctx_c6e7f8bb4a09, state=failed, failedStage=dispatch_input, lastError=agent_not_in_foreground, mutation request fdf96370-b058-4774-ade8-a0f3718ed8a0.
  • Second retry: ctx_fbc4cda99ef5, same failure fields, mutation request 5a87c817-9814-465c-9519-0c85cff434fb.
  • Original ctx_d84720c2dbca readiness timeout was reconciled before retries; it never ran the Task.
  • After owner restart, FIRST original-Task/original-placement attempt ctx_72c0b8cea13e was state=ready, stage=input_accepted, turnStart=observed, residualResources=[]; request 3fcc4feb-f7f4-4ae5-b6c5-1ec4869f1b36. Second permitted recovery attempt was unused. Requested/effective model remained gpt-6.1-sol/high.
  • Failure mode=terminal; recovery mode=structured; both reason=user_default. This is correlation only: no causal inference about restart, mode, or code.

Historical diagnosis version: 1.4.222-local.1791362825015.73a70faec124 (Codex terminal 0.162.1). Current filing orca --version: 1.4.224-local.1791619543533.c394414d7f4f, direct exit 0, 0.076248750s, stderr empty. Current build is neither freshly failing nor proven fixed by this filing. Historical launch direct exits and durations are unavailable in the retained JSON receipts and remain unavailable.

Local retrospective locator, private run/target path components explicitly REDACTED: <ROOT-WORKTREE>/.orca/<REDACTED-run-directory>/orchestrate-A/retrospective.md, Candidate O1. Retained local receipts relative to that directory: A1/orca-startup-diagnosis.md, A1/review-1-retry-launch.json, A1/review-1-retry2-launch.json, A1/retry1-show.json, A1/retry1-read.json, A1/review-restart-attempt1-launch.json. No target source or credentials are included.

Activity

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

    @DoozyX
    OwnerAuthor

    Retro automation claimed this issue.

    • Coordinator: Claude Code session 5048441e-66c8-44f6-8c00-dfc01571bee2 (Orca terminal term_10be00c6-e094-40c8-bba9-db21a8613ad1)
    • Execution host: Slobodans-MacBook-Pro.local (primary checkout /Users/doozyx/DoozyX/tools/orca)
    • Orca Run/Dispatch IDs: none yet; the first stage is a native subagent that classifies the issue body as SAFE or BLOCKED
    • Evidence: .orca/2026-11-03-retro-issue-19/report.md in the root worktree
    • Planned worktree, only if SAFE: .worktrees/retro-issue-19
  4. added
    retro-parked
    on Nov 3, 2026
  5. DoozyX commented on Nov 3, 2026

    @DoozyX
    OwnerAuthor

    Needs attention: parked by retro automation (classified BLOCKED, no change made).

    • The body is plain defect data with no embedded instructions, credentials, or destructive asks.
    • It is a historical, intermittent report with no reproducer and no source investigation. The filing says the current build is neither freshly failing nor proven fixed.
    • The error comes from src/main/runtime/launched-agent-write-guard.ts:120. It fires when readLaunchedAgentForeground (src/main/runtime/launched-agent-foreground.ts:71) does not return 'agent', or when the host cannot prove the agent is in front. The classifier did not read the foreground probe, so it could not tell which branch failed historically.
    • Any fix from here would be a speculative retry, fallback, or relaxation of a deliberate safety guard, which needs a product decision.
    • Suggested next step: capture a fresh reproducer (the worker-start receipt plus the foreground probe result at failure time), then re-file or remove retro-parked.

    Preserved state: no worktree, branch, commit, PR, or Orca Run was created. The classifier was a read-only native subagent and has exited. The run report is .orca/2026-11-03-retro-issue-19/report.md in the root worktree.

  6. removed
    retro-in-progress
    on Nov 3, 2026
  7. DoozyX commented on Nov 12, 2026

    @DoozyX
    OwnerAuthor

    Recurrence with a Claude worker, not Codex. orca --version => 1.4.257-local.1794459824030.b243371f1eae.

    Command (a follow-up on a settled Claude fix worker, same task, same worktree):

    orca orchestration worker-start ... --agent claude   # follow-up of ctx_8b5d29a92a86 -> ctx_45abf49bb2a8
    

    Expected: the follow-up starts. Actual: ok:false, delivery: reopened, state: failed, failedStage: dispatch_input, lastError: agent_not_in_foreground, residualResources: [terminal ...], next step orca orchestration worker-release --dispatch ctx_45abf49bb2a8. Starting a fresh worker on the same Task with the same spec then succeeded, so the failure was in readiness at injection time, not in the task or worktree.

    Cost: one extra dispatch and a manual release. Retrospective: .orca/2026-11-12-sc-21877/orchestrate/retrospective.md.

  8. DoozyX commented on Nov 30, 2026

    @DoozyX
    OwnerAuthor

    New evidence (run 2026-11-30, Orca 1.4.284-local.1796038778921.e4977ce11a34).

    Command: orca orchestration worker-start --from <coordinator> --spec <review-3 spec> --worktree <unit worktree> --agent claude --json for a unit's last counted review (review #3).

    Expected: a running reviewer.
    Actual: startup failed with agent_not_in_foreground; the coordinator settled the ledger row startup-failed (took=1m), released the dispatch and reserved again; the retry on the same worktree started and finished clean in 5 min. The failed dispatch stays state: failed, terminal released in worker-list.

    Still intermittent: the other 20+ worker starts in this run (implementers, reviews, fixes, cleanup, teardown) started normally. An automatic single retry would have saved a coordinator turn.

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