Skip to content

fix(opencode): keep resumed session bind out of turn tracking - #118

Merged
howdeploy merged 1 commit into
howdeploy:mainfrom
Yt4aZaveta:fix/opencode-resumed-session-busy
Oct 1, 2026
Merged

howdeploy merged 1 commit into
howdeploy:mainfrom
Yt4aZaveta:fix/opencode-resumed-session-busy

Conversation

@Yt4aZaveta

Copy link
Copy Markdown
Contributor

Summary

Resumed OpenCode sessions bind from session.updated events. The bind signal was sending the native session ID as both threadId and turnId, so RuntimeGateway remembered it as a turn before the first prompt. The following session.status:busy event was then discarded as a stale turn start.

This change keeps the native session ID as threadId only. Resumed sessions retain their identity and the first busy event transitions them to working; child-session filtering and stale-turn protection remain unchanged.

Validation

  • node --test --test-concurrency=1 tests/agent-runtime-gateway.test.mjs tests/opencode-result.test.mjs — 21 passed
  • The regression test OpenCode resumed sessions bind from native updates before status events, while child updates remain isolated passes.
  • git diff --check main...HEAD passes.

Known unrelated test failure

The full npm test run currently fails at tests/opencode-auto.test.mjs:64, where the test expects edit: allow and bash: allow while the current base-protection behavior returns restricted rules. This PR changes only src/agent-runtime/opencode-plugin.mjs.

@howdeploy
howdeploy merged commit 2aa6cd5 into howdeploy:main Oct 1, 2026
3 checks passed
@Yt4aZaveta
Yt4aZaveta deleted the fix/opencode-resumed-session-busy branch October 3, 2026 06:54
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