Ctrl+B background command not working in interactive mode
Issue Summary
The Ctrl+B keyboard shortcut for running background commands is not functional in Claude Code interactive mode across multiple terminal environments.
Environment Details
System Information:
- OS: macOS 14.6.0 (Darwin 24.6.0)
- Claude Code: Interactive CLI mode
-
Terminals Tested:
- Tabby terminal
- macOS standard Terminal.app
- Shell: zsh (/bin/zsh)
Problem Description
When attempting to use Ctrl+B to run commands in the background, the functionality does not work. Commands run normally (foreground) instead of being executed in the background.
Steps to Reproduce
- Open Claude Code in interactive mode
- Type a long-running command:
sleep 5 && echo "Background task completed" - Press Ctrl+B (instead of Enter)
- Expected: Command runs in background, can continue conversation
- Actual: Command runs in foreground, blocks interaction
Configuration Attempts
Attempted to resolve potential key binding conflicts by modifying shell configurations:
~/.zshrc:
bindkey '^B' beep
unset "key[^B]"
~/.config/powershell/Microsoft.PowerShell_profile.ps1:
Remove-PSReadLineKeyHandler -Key Ctrl+B
After reloading configurations (source ~/.zshrc), bindkey | grep "^B" returns no results, confirming the binding was removed.
Current Workaround
Using standard background syntax works correctly:
sleep 5 && echo "Background task completed" &
Documentation Status
The Ctrl+B background command feature is not documented in the official Claude Code interactive mode documentation at: https://docs.anthropic.com/en/docs/claude-code/interactive-mode
Impact
This prevents users from running long-running commands in the background while continuing to interact with Claude Code, reducing productivity in development workflows.
Request
Please clarify if:
- Ctrl+B background commands are an intended feature
- Additional configuration is required
- This is a known limitation or bug
Thank you for investigating this issue!
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5376
- https://github.com/anthropics/claude-code/issues/5378
- https://github.com/anthropics/claude-code/issues/5534
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
No other issue has been solved yet. We need a work around to this issue
Try Shift+Ctrl+B
@trevorprater Nothing happened, ah!
Aw, sorry, it worked for me.
I don't know what the release of 1.80 do we have a fix on this issue?
@claude, any update on this issue, as now we have release 1.98 already.
Also would like this to work.. I tried all above solutions and still not working.
Platform: macOS 15.6.1 App: Ghostty Claude Code Version: 1.0.120
Confirming this issue persists. Neither Ctrl+B nor Shift+Ctrl+B work to background commands on macOS.
Tested:
- Ctrl+B: No effect
- Shift+Ctrl+B: No effect
Current workaround: Appending & to commands works: sleep 30 &
Would appreciate either:
- Configurable keybindings in settings
- Alternative default like Cmd+B for macOS
- Official documentation of the & workaround until fixed
This significantly impacts workflow when running dev servers or long-running processes.
doesn't work on Windows either (powershell, Windows Terminal, claude code version 2.0.1)
Claude code suggest me solution for iterm2. It works for me:
- Open iTerm2 → Settings (⌘,)
- Navigate to: Profiles → Keys → Key Mappings
- Click the "+" button to add a new mapping
- Press: Ctrl+B when prompted
- Set Action to: "Send Hex Code"
- Enter hex code: 0x02
- Click OK
Since this issue was published (or maybe when it was published as well), the ctrl+b command is documented in interactive mode: https://docs.claude.com/en/docs/claude-code/interactive-mode#how-backgrounding-works. It's not listed in the general controls table (and maybe should be added there) https://docs.claude.com/en/docs/claude-code/interactive-mode#general-controls
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.