Skip to content

Headless opencode run can hang after model banner under parallel startup #33319

Closed as not planned

Description

@coygeek

Description

In a parallel headless workflow, some opencode run processes can reach the model banner and then make no further progress. In my reproduction, this happened while a sibling worker failed with database is locked.

The stuck worker logs contained only:

> build · cohere/north-mini-code:free

No tool calls, prompt reads, streamed model output, retry message, timeout, or error followed. The processes stayed alive until the coordinator terminated them externally.

This may be another symptom of the same shared-state contention discussed in #21215 and #29395, but the user-visible failure mode is different: the worker does not crash, it just appears parked after model initialization.

Expected behavior: if headless opencode run is waiting on database/state/provider initialization, it should surface that state and either complete, retry, or fail within a bounded window.

Plugins

--pure was used in synthetic probes. The wrapper run used a generated project-local config for an OpenAI-compatible OpenRouter provider.

OpenCode version

1.17.8

Steps to reproduce

  1. Configure an OpenAI-compatible provider/model. In my reproduction, the model was openrouter/cohere/north-mini-code:free.
  2. Launch three headless workers close together:
for worker in 1 2 3; do
  (
    OPENCODE_CONFIG_DIR="$generated_config_dir" \
      opencode run \
        --dangerously-skip-permissions \
        -m openrouter/cohere/north-mini-code:free \
        --title "worker-$worker" \
        "Return a short sentinel."
  ) &
done
wait
  1. In the observed run:
    • one worker failed immediately with database is locked;
    • sibling workers printed only > build · cohere/north-mini-code:free;
    • those sibling workers did not emit further progress or a terminal error within the bounded test window.

Screenshot and/or share link

No screenshot/share link. The model banner excerpt is included above.

Operating System

macOS 26.5.1

Terminal

Headless opencode run launched from tmux windows in zsh.

Activity

  1. github-actions commented on Aug 22, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions