Skip to content

fix(core): isolate shell jobs by shell ID - #45985

Merged
rekram1-node merged 2 commits into
v2from
codemode-shell-repro
Aug 28, 2026
Merged

rekram1-node merged 2 commits into
v2from
codemode-shell-repro

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Give each shell process its own job, keyed by its existing shell ID instead of the enclosing tool-call ID. Parallel shell calls inside one CodeMode execution currently share that tool-call ID, so the job service joins unrelated commands and some calls never receive their result.

  • Use the returned job ID for background completion observers; keep permission attribution and plugin hook IDs unchanged.
  • Match desktop/web background-task completion and TUI completion navigation by shell ID, preserving legacy tool-call-ID matching for saved messages.
  • Keep one focused parallel-shell regression and update existing background-notification, restart-recovery, and TUI navigation tests.

No new metadata fields or schema changes. Background completion jobID now identifies the shell job; shellID remains the stable link to the command. Subagent jobs, the default CodeMode tool configuration, and nested output rendering are unchanged.

Validation

  • Core: shell, CodeMode, job, subagent, and session execution suites — 114 passed, 36 platform/tool-dependent skips. Run with SHELL=/bin/bash on this host.
  • TUI: session-row suite — 20 passed, including shell-ID and legacy-ID navigation.
  • App: existing request/session model suites — 18 passed.
  • Package typechecks: core, TUI, and app.
  • The focused parallel-shell regression times out with the original job key and passes with the fix.

Production-build tab-switch benchmark remains inconclusive: two of three baseline samples and one of three final samples completed; the others timed out. No performance improvement or full browser-validation claim is made.

Requested by: @rekram1-node (Aiden via Slack)

@rekram1-node
rekram1-node merged commit f699205 into v2 Aug 28, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the codemode-shell-repro branch August 28, 2026 18:13
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant