agent-orchestrator/packages/plugins
Harsh Batheja cf31dee0b8
fix: implement PR325 session capture fallback and spawn race hardening (#366)
* fix: capture exact OpenCode session ID from JSON stream to prevent orphan sessions

- Primary: Extract session_id from opencode run --format json step_start event
- Fallback: Title-based match with newest-first sorting for delayed visibility
- Core: Add atomic reserveSessionId check in spawnOrchestrator to prevent race conditions
- Prevents orphan sessions when multiple spawns use same title or delayed discovery

(cherry picked from commit 42cc0cfa1a)

* fix: capture OpenCode session id from stream output

(cherry picked from commit 42b3bf3ba6)

* fix: respawn orchestrators when stale metadata is left behind

(cherry picked from commit e519628017)

* fix: align respawn guard and opencode test expectation

* fix: remove unused helper from opencode launch path

* fix: remove unused function and align tests with session capture format

- Remove unused buildSessionLookupScript function from opencode agent
- Update integration tests to expect --format json flag in launch commands
- Fix assertions for exec opencode --session wrapper format

* fix: address Bugbot findings on PR #366

- Fix orphaned runtime leak when reuse strategy finds alive runtime but
  get() returns null (now destroys the orphaned runtime)
- Restore session ID format validation in fallback script with
  isValidId regex check
- Add regression tests for both fixes

* fix: address additional Bugbot findings on PR #366

- Add timestamp helper to fallback sort to avoid NaN from invalid dates
- Add session ID type/format validation to primary capture script
- Add tests for both robustness improvements
2026-03-10 08:42:07 +05:30
..
agent-aider fix: handle permissions=skip correctly in codex plugin (#337) 2026-03-07 20:27:01 +05:30
agent-claude-code fix: handle permissions=skip correctly in codex plugin (#337) 2026-03-07 20:27:01 +05:30
agent-codex fix(codex): harden gh wrapper resolution with explicit GH_PATH 2026-03-08 02:55:31 +05:30
agent-opencode fix: implement PR325 session capture fallback and spawn race hardening (#366) 2026-03-10 08:42:07 +05:30
notifier-composio feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
notifier-desktop feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
notifier-openclaw feat(ao): add OpenClaw notifier plugin for AO escalations 2026-03-09 18:24:30 +05:30
notifier-slack feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
notifier-webhook feat(ao): add OpenClaw notifier plugin for AO escalations 2026-03-09 18:24:30 +05:30
runtime-process feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
runtime-tmux feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
scm-github feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
scm-gitlab fix(gitlab): handle closed MR state and deduplicate glab helpers (#358) 2026-03-08 12:34:31 +05:30
terminal-iterm2 feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
terminal-web feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
tracker-github feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
tracker-gitlab fix(gitlab): handle closed MR state and deduplicate glab helpers (#358) 2026-03-08 12:34:31 +05:30
tracker-linear feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
workspace-clone fix: destroy old runtime before restore, cleanup clone on failure (#109) 2026-02-19 01:35:49 +05:30
workspace-worktree feat: implement session restore for crashed/exited agents (#104) 2026-02-19 01:12:57 +05:30