Skip to content

feat: add /btw background session command#18917

Open
Svtter wants to merge 4 commits intoanomalyco:devfrom
Svtter:feat/btw-background-session
Open

feat: add /btw background session command#18917
Svtter wants to merge 4 commits intoanomalyco:devfrom
Svtter:feat/btw-background-session

Conversation

@Svtter
Copy link

@Svtter Svtter commented Mar 24, 2026

Issue for this PR

Closes #16992
Split from #18635

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR contains the /btw command work split out from #18635.

It includes:

  • /btw ask, /btw todo, and /btw status
  • background child session creation and parent-session result reporting
  • /btw-specific synthetic message filtering so status/result notes do not leak back into later model turns
  • follow-up cleanup by archiving completed or failed background child sessions
  • the review-driven refactor that breaks the /btw flow into smaller helpers

How did you verify your code works?

  • cd packages/opencode && bun typecheck
  • cd packages/opencode && bun test test/session/btw.test.ts test/session/message-v2.test.ts

Screenshots / recordings

N/A - backend/CLI command, no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Brendan DeBeasi and others added 4 commits March 24, 2026 18:19
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicates Found:

  1. PR feat: add /btw background session command #18635 - feat: add /btw background session command #18635

  2. PR feat: add /btw background session command #17198 - feat: add /btw background session command #17198

    • Same title: "feat: add /btw background session command"
    • Appears to be an earlier iteration of this feature
  3. PR feat: Add the /btw command #17189 - feat: Add the /btw command #17189

    • "feat: Add the /btw command"
    • Related earlier work on the /btw command

Summary: PR #18917 is explicitly split from PR #18635 (as mentioned in the description), so #18635 is the original parent PR. PR #17198 appears to be an earlier attempt at the same feature. These should be reviewed to ensure no duplicate work is being done across all three PRs.

@Svtter
Copy link
Author

Svtter commented Mar 25, 2026

@atharvau This is the split-out /btw PR from #18635.

I separated the tool-limit work into #18916, so this PR is just the /btw command flow, background child session handling, and the /btw-specific synthetic message filtering needed for it.

I also re-ran the local verification here and it passes:

  • cd packages/opencode && bun typecheck
  • cd packages/opencode && bun test test/session/btw.test.ts test/session/message-v2.test.ts

If this scope looks good now, do you think this is ready to merge?

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.

[FEATURE]: add /btw command

1 participant