Skip to content

[Bug]: Fresh ZCode worker times out before its first task is delivered #23373

Description

@Alex-wangyang

Operating system

macOS (Apple Silicon)

Orca version

1.4.214; reproduced against source base 459410a63b.

Details

A newly launched ZCode terminal is visibly ready for input, but orca orchestration worker-start --agent zcode times out at agent_readiness before delivering its first task.

Reproduction:

  1. Install/configure the official ZCode CLI (tested with the v3.14.3 distribution), with a working model and Orca-managed hooks enabled.
  2. Create a coordinator terminal and an orchestration Run using the normal CLI workflow.
  3. Run orca orchestration worker-start --run <run> --from <coordinator> --worktree path:<checkout> --agent zcode --spec "Create a small canary file and report completion" --timeout-ms 45000 --json. Do not reuse an existing terminal.
  4. ZCode draws its composer, but the receipt reports state: failed, stage: agent_readiness, lastError: timeout. No task is delivered.

Expected: once the fresh ZCode composer is ready, deliver the first task through normal dispatch and preserve the ordinary lifecycle/authority checks.

Source diagnosis:

  • The shipped ZCode agent config already selects draftPasteReadySignal: zcode-composer-prompt; the existing scanner recognizes the composer after entering the alternate screen.
  • startLocalWorker still waits for generic tui-idle before dispatching terminal workers. The continuously animated ZCode banner does not leave durable composer evidence in the line-folded idle tail.
  • In the tested ZCode version, SessionStart hooks run when the first turn starts, so waiting for hook-derived readiness before the first input does not resolve this startup case.

A small local fix reusing the existing composer scanner for fresh ZCode workers passed two packaged-app canaries (task delivery, exact file read/write verification, worker_done, and release). Reused terminals retain the normal idle wait. I will link the patch PR here through its closing reference.

Related: #16228 covers broader ZCode orchestration and transcript support. This report is limited to the first-dispatch readiness gap in the currently released interactive path.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions