Skip to content

fix(tui): make ctrl+b reachable in subagent views - #53892

Closed
opencode-agent[bot] wants to merge 1 commit into
devfrom
subagent-background-key
Closed

opencode-agent[bot] wants to merge 1 commit into
devfrom
subagent-background-key

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

In a subagent view, when the subagent is running a long shell command, the TUI shows "Press ctrl+b to move running work to the background", but pressing it does nothing.

Why
Subagent views keep the composer (subagent picker) open, which pushes the composer keymap mode. session.background was only bound in the base-mode layer, so ctrl+b was unreachable. The hint reads registered shortcuts, so it still rendered.

Change
Also bind session.background in composer mode. The command still targets the viewed session, so in a subagent view it backgrounds the subagent's own blocking shell. Whether the subagent itself is foreground or background doesn't matter.

Testing
Verified with opencode-drive and a simulated LLM. A foreground general subagent runs a real 12-second shell loop. Open the subagent (down + enter), wait for the hint, press ctrl+b.

  • origin/v2: the hint stays visible and the shell keeps running in the foreground until it completes.
  • This branch: the shell flips to Background, the hint disappears, and the subagent continues with its next response. The parent stays blocked on the subagent until it finishes.

Also ran bun run typecheck in packages/tui.

Requested by: @nexxeln (nexxel via Slack)

Subagent views keep the composer open, which switches the keymap to composer mode. session.background was only bound in base mode, so the hint showed but ctrl+b did nothing. Bind it in composer mode too.
@opencode-agent
opencode-agent Bot force-pushed the subagent-background-key branch from 481a4df to 31dc610 Compare October 8, 2026 08:06
@opencode-agent opencode-agent Bot changed the title fix(tui): make ctrl+b work from subagent views fix(tui): make ctrl+b reachable in subagent views Oct 8, 2026
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:36
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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