Skip to content

agentctl launch opencode|codex sessions silently die ~45s after start; direct CLI invocation works #172

Open

Description

@doink-kindo

Summary

agentctl launch opencode --model ohm/moonshotai/Kimi-K2.6 and agentctl launch codex --model openai/gpt-5.4 both report status: stopped within 30-50s of launch with no useful output. peek <id> returns "Session not found" immediately after. Direct invocation of opencode run --model ohm/moonshotai/Kimi-K2.6 "..." from the same worktree, with the same model, works correctly and produces normal output.

Repro (2026-05-04 PDT)

  1. Worktree at HEAD with node_modules present.
  2. agentctl launch opencode --model ohm/moonshotai/Kimi-K2.6 --cwd <worktree> -p "<task>" — returns session id, exits, then agentctl status <id> reports stopped within ~50s. peek <id> → "Session not found."
  3. agentctl launch codex --model openai/gpt-5.4 --cwd <worktree> -p "Say HI" — same fast-stop pattern, codex rollout JSONL written but only contains task_started → task_complete with last_agent_message: null and no token_count event.
  4. opencode run --model ohm/moonshotai/Kimi-K2.6 "Say HI" from the same shell, same cwd → returns "HI" normally and runs full task to completion.

Expected

agentctl launch for opencode/codex should produce a long-lived session that matches what the underlying CLI does when invoked directly.

Impact

PR review fix-up loops fail silently. Had to bypass agentctl and launch opencode run directly via nohup to land the round 3 fixes on PR UsableMachines/mono#9954.

Environment

  • macOS, Node v25.5.0
  • agentctl: /opt/homebrew/bin/agentctl (latest installed today)
  • opencode: 1.2.11
  • codex: 0.104.0
  • Ohm gateway running on :4000, healthy (verified via direct curl to /v1/chat/completions for both gpt-5.4 and Kimi-K2.6)
  • KINDO_API_KEY valid

Related

  • AGENTS.md "agentctl/OrgLoop Bug Policy" — file first, work around second.
  • Workaround used: nohup opencode run --model ohm/moonshotai/Kimi-K2.6 "..." > /tmp/run.log 2>&1 &

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