Visitar URL original
fix(tui): make ctrl+b reachable in subagent views by opencode-agent[bot] · Pull Request #53892 · anomalyco/opencode · GitHub
Skip to content

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

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

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

This branch has not been deployed

No deployments
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