Skip to content

runtime: detached warm session owners and opencode ACP mode#23

Merged
osolmaz merged 6 commits intoopenclaw:mainfrom
osolmaz:fix/opencode-acp-mode
Feb 25, 2026
Merged

runtime: detached warm session owners and opencode ACP mode#23
osolmaz merged 6 commits intoopenclaw:mainfrom
osolmaz:fix/opencode-acp-mode

Conversation

@dutifulbob
Copy link
Contributor

@dutifulbob dutifulbob commented Feb 25, 2026

Summary

This PR moves acpx to detached warm session owners so prompt calls no longer block on queue-owner idle TTL.

It also fixes OpenCode invocation to ACP mode.

What changed

  • Run OpenCode in ACP mode from registry defaults:

    • opencode now maps to npx -y opencode-ai acp
  • Detached queue-owner architecture:

    • caller path no longer runs the owner loop
    • caller submits to an active owner or spawns detached __queue-owner
    • prompt returns when the turn completes (no hidden idle wait)
  • Internal owner runtime wiring:

    • hidden internal owner command path in CLI
    • owner process reuses existing queue protocol and turn controller
  • Queue lease hardening:

    • lock state now includes ownerGeneration, heartbeatAt, and queueDepth
    • owner heartbeat refresh while alive
    • stale owner heartbeat detection and reclaim
  • Status observability:

    • status now reports owner health fields:
      • ownerStatus
      • ownerPid
      • ownerGeneration
      • ownerHeartbeatAt
      • ownerQueueDepth
  • Test updates:

    • integration test: prompt exits while owner remains warm and reusable
    • queue-ipc test: stale heartbeat lock reclamation
    • harness updates for detached-owner timing behavior

Validation

  • npm run format:check
  • npm run lint
  • npm test
  • manual smoke with mock agent:
    • first prompt returns immediately
    • owner stays alive after prompt
    • second prompt reuses warm owner

Breaking behavior

This is intentionally a forward-only alpha refactor for owner runtime/lock behavior.
No backward-compatibility shims were added for legacy owner lock shape.

@dutifulbob dutifulbob changed the title registry: run opencode in ACP mode runtime: detached warm session owners and opencode ACP mode Feb 25, 2026
@osolmaz osolmaz merged commit a31fdae into openclaw:main Feb 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants