Skip to content

agentctl launch opencode can stop immediately and then 'Session not found' on peek #160

@c-h-

Description

@c-h-

Summary

agentctl launch opencode is sometimes creating a run id, immediately reporting Status: stopped, and then refusing peek with Session not found, even though the launch returned success.

Repro from today's PR polish flow

Workspace: ~/code/mono-try-g-60e456-opencode-m2p5

Commands used:

agentctl launch opencode --model minimax-m2p5 \
  --callback-session "agent:kindo:orgloop:github:pr:9473" \
  --callback-agent "kindo" \
  --cwd /Users/ms/code/mono-try-g-60e456-opencode-m2p5 \
  -p "Address Claude AI review feedback on PR #9473 ..."

Observed twice in a row:

  • Launch returned a session id (2d4b240d, then f0b6978a)
  • agentctl status <id> immediately reported:
    • Status: stopped
    • correct adapter/model/cwd
  • agentctl peek <id> returned:
    • Session not found: <id>
  • No code changes were made in the worktree from those launches

I worked around it by running opencode run -m ohm/accounts/fireworks/models/minimax-m2p5 ... directly with PTY in the same worktree, and that completed normally.

Expected

If launch succeeds, I should be able to inspect the created session with status + peek, and the run should not terminate immediately without surfacing an error.

Actual

Launch appears successful, but the session is effectively gone immediately after creation and peek cannot inspect it.

Impact

This broke the normal PR-review fix flow in the Kindo mono workspace and forced a direct OpenCode fallback.

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