Ctrl+B background command not working in interactive mode

Status Closed — not planned
Maintainer reply None cached
Activity 15 comments · opened Aug 12, 2025 · closed Jan 8, 2026

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

  1. Open Claude Code in interactive mode
  2. Type a long-running command: sleep 5 && echo "Background task completed"
  3. Press Ctrl+B (instead of Enter)
  4. Expected: Command runs in background, can continue conversation
  5. 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:

  1. Ctrl+B background commands are an intended feature
  2. Additional configuration is required
  3. This is a known limitation or bug

Thank you for investigating this issue!

View original on GitHub ↗

15 Comments

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5376
  2. https://github.com/anthropics/claude-code/issues/5378
  3. 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

wangkanai · 1 year ago

No other issue has been solved yet. We need a work around to this issue

trevorprater · 1 year ago

Try Shift+Ctrl+B

wangkanai · 1 year ago

@trevorprater Nothing happened, ah!

trevorprater · 1 year ago

Aw, sorry, it worked for me.

wangkanai · 1 year ago

I don't know what the release of 1.80 do we have a fix on this issue?

wangkanai · 12 months ago

@claude, any update on this issue, as now we have release 1.98 already.

Georgelstone · 12 months ago

Also would like this to work.. I tried all above solutions and still not working.

jsulopzs · 11 months ago

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:

  1. Configurable keybindings in settings
  2. Alternative default like Cmd+B for macOS
  3. Official documentation of the & workaround until fixed

This significantly impacts workflow when running dev servers or long-running processes.

nikitakot · 11 months ago

doesn't work on Windows either (powershell, Windows Terminal, claude code version 2.0.1)

trmquang93 · 10 months ago

Claude code suggest me solution for iterm2. It works for me:

  1. Open iTerm2 → Settings (⌘,)
  2. Navigate to: Profiles → Keys → Key Mappings
  3. Click the "+" button to add a new mapping
  4. Press: Ctrl+B when prompted
  5. Set Action to: "Send Hex Code"
  6. Enter hex code: 0x02
  7. Click OK
TyceHerrman · 10 months ago

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

github-actions[bot] · 8 months ago

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.

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.