Skip to content

revert(tasks): take OpenCode subagents out again (#1987) until its status hub test stub has onPaired - #2039

Closed
devswha wants to merge 1 commit into
mainfrom
revert/1987-status-hub-break
Closed

devswha wants to merge 1 commit into
mainfrom
revert/1987-status-hub-break

Conversation

@devswha

@devswha devswha commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Revert

This reverts #1987 (afdf3a7) to get main green again.

Why: main's Fast checks fail on afdf3a7 (run 40381817339, job 121779843071). Three tests in server/core/status.test.ts, which #1987 adds, fail with 'devices.onPaired' is undefined:

  • the status hub's OpenCode subagents > holds an OpenCode turn after Claude Code's on its subagent though its session is found after the turn, and calls its finish off
  • ... > keeps an OpenCode turn held though a snapshot read before its session was found is answered after
  • ... > lets a Claude Code session that follows OpenCode's in the pane hold nothing of OpenCode's

#1977 (2ad63df, merged earlier) made the status hub call devices.onPaired(...) (server/core/status.ts:280). #1987's new test builds the hub with a devices stub of { gated: false, has: () => true }, which has no onPaired. Each PR was green on its own base, and they merged without a textual conflict. Reproduced locally at afdf3a7: 0 pass, 3 fail.

Re-landing: #1987 comes back as a new PR with the test stub given onPaired: () => {} and nothing else changed. Its approved review carries over.

Checks: the server/core and tasks-routes unit tests pass on this branch, and typecheck is clean.

… Code's (#1987)"

This reverts commit afdf3a7. Main's Fast checks fail on it: three tests in server/core/status.test.ts ('the status hub's OpenCode subagents') build a status hub whose devices stub has no onPaired, which #1977 (2ad63df) made the status hub call. The two PRs merged cleanly but break together. The feature comes back with the stub fixed.

Co-authored-by: sisyphus-dev-ai <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between afdf3a7 and 80b6458.

Files selected for processing: 23
  • changelog.d/opencode-subagents.md
  • docs/guide.md
  • server/background-wait.test.ts
  • server/background-wait.ts
  • server/core/server-core.ts
  • server/core/status.test.ts
  • server/core/status.ts
  • server/index.ts
  • server/opencode-subagents.test.ts
  • server/opencode-subagents.ts
  • server/opencode.contract.test.ts
  • server/opencode.test.ts
  • server/opencode.ts
  • server/tasks-routes.test.ts
  • server/tasks-routes.ts
  • server/transcript-records.ts
  • shared/tasks.ts
  • src/components/BackgroundTasks.tsx
  • src/components/Composer.tsx
  • src/lib/api.ts
  • src/lib/i18n/chat.ja.ts
  • src/lib/i18n/chat.ko.ts
  • src/lib/i18n/chat.zh.ts
Files with no reviewable changes: 11
  • src/lib/i18n/chat.ko.ts
  • server/opencode-subagents.test.ts
  • server/core/status.test.ts
  • src/lib/i18n/chat.zh.ts
  • shared/tasks.ts
  • server/background-wait.ts
  • changelog.d/opencode-subagents.md
  • src/lib/i18n/chat.ja.ts
  • server/background-wait.test.ts
  • server/opencode.contract.test.ts
  • server/opencode-subagents.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Behavior Changes
    • OpenCode subagents are no longer shown as tracked background tasks or task cards. Their descriptions and outputs appear as notices in the conversation instead.
    • The background-task view no longer displays a count of additional running tasks.
    • OmO tasks and runs, and Claude Code subagents, remain available in the background-task view.
  • Documentation
    • Updated the background-task guide to reflect the supported task types and their behavior.

This change removes OpenCode subagent tracking and its task-route and UI support. The task route continues to return OmO or Claude activity. OpenCode synthetic subagent completions now use notice handling instead of task-result cards.

Changes: OpenCode subagent status and lifecycle

Layer / File(s) Summary
Remove tracker and status lifecycle
server/opencode-subagents.ts, server/core/status.ts, server/core/server-core.ts, server/background-wait.ts, server/*test.ts
The OpenCode subagent tracker, status-hub integration, and related wait-state handling are removed. Tests for OpenCode tracking and its status lifecycle are deleted.
Limit task route to OmO and Claude
server/tasks-routes.ts, server/index.ts, server/tasks-routes.test.ts
The task handler no longer accepts an OpenCode tracker. It returns OmO activity when an OmO session exists; otherwise, it checks Claude subagents or returns an empty task list.
Use notice handling for subagent output
server/opencode.ts, server/transcript-records.ts, server/opencode.test.ts, server/opencode.contract.test.ts
Synthetic subagent completions use the general notice path instead of task-result cards. Tool output extraction no longer unwraps subagent tags, and store reads use a fixed busy timeout.
Align task activity UI and guide
shared/tasks.ts, src/components/BackgroundTasks.tsx, src/components/Composer.tsx, src/lib/api.ts, src/lib/i18n/chat.*.ts, docs/guide.md, changelog.d/opencode-subagents.md
The activity API and UI no longer expose or display the count of unlisted running tasks. The guide and changelog remove descriptions of OpenCode subagent behavior.

Priority: Normal

Estimated code review effort: 4 (Complex) | ~35 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#1987: Adds the OpenCode subagent behavior that this PR removes, including tracking, task-route support, and result cards.
  • devswha/ovis#1977: Adds DeviceStore.onPaired, which is relevant to the removed status test’s device stub.

Suggested reviewers: kilhyeonjun

Merge Risk: Minimal · up to 80b64

No actionable issue remains from this review; the change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 76.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 11 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description explains the problem, identifies the failing tests and cause, and reports validation results. It uses a different heading structure from the template, but it contains the required chan…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title accurately identifies the main change: removing OpenCode subagents as a temporary revert until the status hub test stub includes onPaired.
Full details: Description check

Explanation

The description explains the problem, identifies the failing tests and cause, and reports validation results. It uses a different heading structure from the template, but it contains the required change and validation information.

Full details: Docstring Coverage

Explanation

Docstring coverage is 76.47% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 11 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha devswha changed the title Revert "feat(tasks): surface an OpenCode pane's subagents like Claude Code's (#1987)" revert(tasks): take OpenCode subagents out again (#1987) until its status hub test stub has onPaired Oct 26, 2026
@devswha

devswha commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

Closing: replaced by #2040, which fixes the test stub forward (one line, test-only) instead of reverting #1987.

@devswha devswha closed this Oct 26, 2026
@devswha
devswha deleted the revert/1987-status-hub-break branch October 26, 2026 19:22
devswha added a commit that referenced this pull request Oct 26, 2026
…ner (#2040)

## Change

This fixes main, which has been red since afdf3a7 (#1987): CI run
40381817339 fails Fast checks.

#1977 (2ad63df) made the status hub subscribe to `devices.onPaired`
(`server/core/status.ts:280`). The OpenCode subagent tests that #1987
added in `server/core/status.test.ts` build the hub with the devices
stub `{ gated: false, has: () => true }`, which has no `onPaired`. Three
tests fail with `devices.onPaired is not a function`. Each PR was green
on its own base, and they merged without a textual conflict.

The stub now has a no-op `onPaired`. This is test-only, with no change
to product code. It replaces the revert in #2039, so #1987's feature
stays.

## Checks

- `bun test ./server/core/status.test.ts`: 3 pass, 0 fail. On main it is
0 pass, 3 fail.
- `bun run check fast`: everything ok (typecheck, build, unit tests,
generated files, workflow syntax).
- `scripts/changelog-fold.test.ts` passes with the new fragment.

Co-authored-by: mp <mp@local>
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.

1 participant