Skip to navigation

Claude Code tmux Setup: Passthrough Keys and Notification Bells

In short: Configure tmux passthrough and focus events, reload the configuration and choose a terminal bell when you need a visible completion signal.

Published 15 min read
On this page

Claude Code can run inside tmux, but keyboard protocols and terminal-bell notifications need the documented tmux options to pass through. Official guidance calls for allow-passthrough, focus-events, extended-keys and an xterm extendedkeys terminal feature. After editing tmux configuration, source the file, detach, reattach and restart Claude Code. To choose the terminal-bell notification channel, set preferredNotifChannel to terminal_bell. The terminal must still produce the bell, so this setting does not guarantee audible output on every emulator.

The practical verdict is a layered check. Configure tmux, complete the full reload sequence, then test keys and notifications separately. tmux is not required for Claude Code, and a bell is not guaranteed. The win is a documented path for preserving terminal behavior through tmux. The loss is another configuration layer whose state must be reloaded and verified.

Why tmux changes the input path

tmux sits between the terminal emulator and the program running inside a pane. Instead of delivering every event directly, it can manage panes, sessions and terminal capabilities. That management is useful, but it means Claude Code sees the environment tmux presents rather than an untouched connection to the outer emulator.

A modified key can be affected by more than one layer. The emulator must encode it, tmux must pass or represent it, and Claude Code must interpret the result. Similarly, a notification can be generated inside the application but still depend on terminal behavior before a person notices it. Changing only one layer leaves the rest untested.

This is why “it works outside tmux” is valuable evidence but not a complete diagnosis. It narrows the boundary without identifying which option is missing. The reverse is also true: a failure inside tmux does not prove that Claude Code or the emulator is broken. The documented response is to inspect the tmux options and reload sequence before adding custom hooks.

The Shift+Enter compatibility guide provides the terminal-side decision table. Use it to identify the emulator branch, then apply this runbook when tmux is part of the path. The two guides solve different layers and should not be merged into one vague keyboard fix.

Evidence map: official options and a bounded reload

Official evidence identifies the required tmux configuration categories in F059, the reload order in F060 and the notification channel value in F061. These facts were checked on the fetched terminal configuration page on 2026-11-28. No community issue is needed to support the baseline procedure.

tmux evidence map connecting passthrough, focus events, extended keys, terminal features and the reload sequence
Evidence owner: Claude Code Docs. The map summarizes F059 through F061 and does not claim a tmux version floor or universal bell output.

Unknowns remain important. The fact pack gives no minimum tmux version, no measured key success rate and no guarantee that every terminal emulator will sound a bell. Those gaps do not block the documented configuration, but they limit the promises a team can make after applying it.

Check the tmux environment

Begin by naming each layer. Record the outer terminal emulator, the tmux session in use, the shell inside the pane and the Claude Code launch surface. A remote host should be identified separately from the local emulator because the two machines can hold different configuration files.

Next, inspect the tmux configuration that the running server actually loaded. Editing a file does not prove that the active server has read it. A team can have a correct file and an older server state at the same time, which makes the later reload sequence essential.

Environment fact What to capture Diagnostic value
Outer emulator Product and version Identifies the terminal-bell and key-input boundary
tmux context Session or pane description Locates where Claude Code is running
Loaded configuration File used by the active server Separates file contents from running state
Claude Code surface Terminal command or integrated launch Identifies what must restart
Notification expectation Audible bell, visual alert or no expectation Prevents a channel setting from becoming a sound guarantee

Avoid diagnosing an unrelated shell problem as a tmux passthrough failure. The native install PATH and binary ownership guide covers executable resolution. The WSL IDE environment guide covers launch-context variables. Neither replaces the tmux option check.

Enable passthrough and focus events

F059 names allow-passthrough as part of the documented tmux configuration. In operational terms, passthrough allows supported terminal sequences to move through tmux rather than being consumed at the multiplexer boundary. Keep the option name exact when comparing a configuration with the official page.

focus-events is the second named option. Focus events let supporting applications receive information about terminal focus changes. That matters for interfaces that adjust behavior when a pane gains or loses focus, but the fact pack does not promise a particular notification outcome from this option alone.

Enable both in the tmux configuration, then preserve any existing values elsewhere in the file. A safe edit adds or updates the intended lines instead of replacing the whole file. This is configuration editing, not an invitation to copy a stranger’s complete tmux setup.

tmux workflow from option changes through sourcing, detaching, reattaching and restarting Claude Code
Evidence owner: Claude Code Docs. The documented sequence includes all reload stages; sourcing alone is not presented as sufficient for every terminal.

Enable extended keys and the terminal feature mapping

Extended keys carry richer key information than a simple character. F059 names extended-keys and an xterm extendedkeys terminal feature as separate parts of the documented setup. Keeping both is important because enabling one setting does not prove the other capability has been advertised.

The following block shows the option names and values summarized by the official fact. Compare it with the current terminal configuration page before applying it to a managed setup, and preserve the rest of your existing tmux file.

bash
set -g allow-passthrough on
set -g focus-events on
set -g extended-keys on
set -as terminal-features ',xterm*:extkeys'

No tmux version requirement is stated in the fact pack. Do not add one to a team runbook without a new official source. If an installed tmux rejects an option, record the exact option and error rather than guessing a replacement or claiming that every older release behaves the same way.

tmux option or feature Claude Code behavior it supports Boundary
allow-passthrough Passes supported terminal sequences through tmux Does not prove every emulator handles every sequence
focus-events Preserves focus-related events Does not guarantee a notification sound
extended-keys Enables tmux extended-key handling Must be considered with the terminal feature
xterm extendedkeys feature Advertises extended-key terminal support No version floor is supplied in this packet

The settings files and precedence guide is useful when a Claude Code setting appears to lose to another scope. It does not replace the tmux configuration check because these options live at a different layer.

Reload the tmux configuration in the documented order

F060 gives an ordered sequence: source the file, detach, reattach and restart Claude Code. Treat the order as the runbook, not as optional examples. A source operation updates tmux configuration state, while detaching and reattaching rebuilds the terminal attachment context. Restarting Claude Code then gives the application a fresh start inside that context.

Configuration step Required action Why the next stage remains
Edit tmux configuration Save the intended option changes The running server still needs to read them
Source the file Apply the edited configuration to tmux Attachment state still needs the documented refresh
Detach Leave the tmux session without ending it Reattachment is a separate documented step
Reattach Return to the session Claude Code still needs a restart
Restart Claude Code Launch it again inside the refreshed session Key and notification behavior can now be tested

Use your normal tmux controls for detach and reattach. The fact pack establishes the sequence but does not prescribe a custom prefix binding, session name or notification hook. Keeping those details unchanged reduces the number of variables in the test.

After the restart, repeat the original failing action. If the action now passes, record the full sequence that preceded the result. If it still fails, do not claim that sourcing alone should have fixed it; the documented sequence was longer, and the remaining cause may be outside tmux.

Choose the terminal-bell notification channel

F061 states that preferredNotifChannel set to terminal_bell forces the terminal-bell notification channel. The verified key and value are:

bash
preferredNotifChannel: terminal_bell

That snippet is the documented preference pair, not a complete configuration file. Place it only in the configuration surface identified by the current Claude Code documentation for your setup. The fact pack does not provide a universal file-location recipe, so this guide does not invent one.

A terminal bell is a notification mechanism, not a promise of audible sound. The outer emulator may suppress bells, map them to a visual indication or handle them differently when unfocused. tmux can also be only one part of the path. Test the behavior that matters in the actual environment.

Notification channel or expectation Documented status Terminal behavior to expect
terminal_bell Forces the terminal-bell channel per F061 Terminal must still produce the bell
Audible output on every emulator Not established Do not promise sound
Visual attention indicator Emulator-dependent Observe the actual outer terminal
Custom notification service Outside this guide No hook or service is prescribed

The VS Code auto-connect and relaunch guide covers startup-sensitive IDE behavior. It is a useful reminder that changing a value and changing a running process are separate events, but it does not define the tmux bell path.

Verify keys and notifications separately

A single end-to-end test can hide which layer failed. Test keyboard behavior first with a harmless draft. Confirm ordinary Enter behavior, then test the documented newline action for the outer terminal. The Shift+Enter compatibility guide supplies the native, manual and fallback branches.

Test notification behavior second. Use a disposable Claude Code action that can reasonably produce a completion notification, then observe the outer terminal. Record whether the terminal gives an audible bell, a visual indication or no noticeable result. Do not convert one successful machine into a claim about every terminal.

Tradeoff diagram separating keyboard passthrough success from terminal-bell visibility and sound limitations
Evidence owner: Claude Code Docs. Keyboard support and bell output are separate checks, and audible output remains terminal-dependent.

Keep notification tests free of sensitive content. A completion signal can draw attention from another window, so use material that is safe to expose on the intended display. The goal is to verify plumbing, not to run a real workload while the signal path is uncertain.

When keys pass but the bell is silent, preserve that split result. It suggests that the keyboard configuration and notification expectation should be investigated separately. When both fail, return to the environment record and confirm that the full reload sequence occurred in the correct session.

Worked example: reload without losing the session

Imagine a developer editing ~/.tmux.conf while Claude Code runs in a pane. The file contains the documented options, but the current test still fails. A useful next action is not another edit. It is the F060 sequence applied to the active setup.

Stage Safe operational action Evidence to keep
Configuration saved Confirm intended lines are present Copy the option names, not unrelated file contents
Source Load the tmux configuration file Record that sourcing completed
Detach Leave the session running Note the session used
Reattach Return to that session Confirm the pane is available
Restart Start Claude Code again Repeat the key and notification checks

No invented timing or benchmark is involved. The worked example uses the verified order and leaves session-specific details to the developer’s normal tmux workflow. If a managed environment prevents one stage, record that constraint instead of silently skipping the stage and claiming the documented sequence was completed.

A team note can be concise: “Sourced the tmux file, detached, reattached, restarted Claude Code, then tested Shift+Enter and terminal_bell separately.” This wording preserves the mechanism and the two verification targets. “Reloaded tmux” is too vague because it hides the detach, reattach and application restart stages.

Record the setup and update ownership

Record tmux options separately from Claude Code preferences. The first group controls the multiplexer path. The second chooses the notification channel. Combining them into one undocumented file makes future troubleshooting harder and can lead a developer to edit the wrong owner.

Owner Configuration Update responsibility
tmux Passthrough, focus events, extended keys and terminal feature Keep with the tmux configuration
Claude Code preferredNotifChannel value Keep with the documented Claude Code preference surface
Outer terminal Bell handling and input behavior Verify on the actual emulator
Team runbook Reload order and test record Review when official requirements change

The global config versus settings.json guide explains that not every Claude Code key belongs in an ordinary settings file. The settings env timing guide explains why some values are read at startup. The project-local versus user settings merge guide shows why an override can affect a preference that appears global. All three reinforce the need to identify the owner before editing.

Concrete win, honest loss and practical implication

The win is a documented configuration and reload sequence that addresses the tmux layer directly. A developer can enable the named options, complete every reload stage and test keys and notifications without writing a custom integration. That is a bounded, reproducible procedure.

The loss is terminal dependence. terminal_bell chooses a channel, but it cannot force every emulator to emit audible output. tmux also adds a stateful layer: a saved file does not prove the running server has applied it. These limitations can make a correct configuration look ineffective when the reload was incomplete or the outer terminal handles bells quietly.

The practical implication is to make the reload order a checklist and the notification result an observation. Do not promise sound in onboarding material. Put the emulator in the test record. Keep custom hooks out of this baseline so the documented path stays easy to audit.

Control checklist for tmux options, reload order, separate key tests and terminal-bell observation
Evidence owner: this guide’s checklist, derived from F059 through F061. A passed local test does not establish universal terminal behavior.

Verification checklist

Before closing the task, confirm the following:

  • Outer emulator and tmux context are recorded.
  • allow-passthrough is enabled in tmux configuration.
  • focus-events is enabled.
  • extended-keys is enabled.
  • The xterm extendedkeys terminal feature is present.
  • The tmux file was sourced.
  • The session was detached and reattached.
  • Claude Code was restarted after reattachment.
  • preferredNotifChannel is set to terminal_bell where the documented preference belongs.
  • Key behavior and notification behavior were tested separately.
  • Any missing sound is described as terminal-dependent, not as proof that the setting failed.
Verdict separating documented tmux configuration, full reload sequence and terminal-dependent bell output
Evidence owner: Claude Code Docs. The verdict preserves the no-guaranteed-sound caveat and the complete reload order.

What the public data does not show

The public evidence supplied for this post does not establish a minimum tmux version, a universal audible-bell result or a success rate for extended keys across terminal emulators. It also does not provide a custom notification-hook recipe. Those are unknowns, not invitations to fill in plausible numbers.

This section will be updated if official documentation publishes a tmux version matrix, a broader terminal-bell compatibility list or a different reload requirement. Until then, use the named options, the complete sequence and a local observation. Requirements should be rechecked before publication because configuration interfaces can change.

One AI option for OpenAI-format agents

One AI’s active route serves OpenAI-format agents through https://api.oneaiapikey.com/v1, using one key and the 46 live free IDs. That route is not an Anthropic-format model source for Claude Code, and the One AI Claude IDs were unavailable on 2026-11-27. For a separate OpenAI-format project, inspect the free model list, follow the OpenAI-format quickstart and estimate usage with the cost calculator. The Anthropic messages format guide explains the protocol distinction, while the free IDs for Claude Code users explainer keeps the OpenAI-agents-only boundary explicit.

FAQ

Is tmux required for Claude Code?

No. This runbook applies when tmux is part of the terminal path. Claude Code does not require tmux according to the guardrails for this post.

Which tmux options does the official guidance name?

F059 names allow-passthrough, focus-events, extended-keys and an xterm extendedkeys terminal feature.

Is sourcing the tmux file enough?

The documented sequence is longer: source the file, detach, reattach and restart Claude Code. Do not claim that a reload alone is sufficient for every terminal.

Does terminal_bell guarantee sound?

No. It forces the terminal-bell notification channel, but the terminal must still produce the bell. Audible output depends on the emulator and its settings.

Should I add a custom notification hook?

Not for this baseline. The assigned facts cover tmux options, the reload sequence and the terminal-bell channel. A custom hook would introduce a separate procedure without supporting evidence here.

More Claude Code troubleshooting

Sources

More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →