Skip to content

agentctl stop fails with 'Session not found' but agentctl list shows the session as running #181

Open

Description

@doink-kindo

Repro:

  1. Launch an opencode session via agentctl: agentctl launch opencode --cwd ... -p ...
  2. Wait some time (in my case 34 min; session running normally)
  3. Run agentctl list -a → session shows status=running with short ID 398f57a7
  4. Run agentctl stop 398f57a7 → 'Session not found: 398f57a7-fa5a-454c-86c8-86ce1f83ccc0'
  5. Run agentctl stop 398f57a7-fa5a-454c-86c8-86ce1f83ccc0 (full UUID) → same 'Session not found' error
  6. agentctl resume 'msg' → same error
  7. ps shows the wrapper PID is alive and the session JSON file exists at ~/.agentctl/opencode-sessions/.json

Expected: stop/resume succeed (or at least find the session that list just returned).

Versions:

  • agentctl: latest installed via npm
  • opencode adapter
  • macOS arm64

Workaround used: kill the wrapper PID directly, agentctl launch --force on the cwd lock.

Probably a daemon-state desync: list reads from one source, stop/resume from another.

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