OmniscioGuidesCorporate launcher
Claude Code behind a corporate launcher: setup
This setting is for an organization that requires every process on a workstation to start through a mandatory launcher. The launcher applies the sandbox, network controls or credential injection that the security posture depends on.
Last checked against Anthropic's documentation on November 26, 2026. By the Omniscio team. Updated .
What the setting does
CLAUDE_CODE_PROCESS_WRAPPER starts every process Claude Code launches from its own binary through your launcher. Set it to the launcher's absolute path, and Claude Code runs the launcher with the Claude Code command as its arguments.
A launcher that wraps the claude command on your PATH cannot reach the background service or the sessions it hosts, because they start from the binary's direct path without looking up claude.
CLAUDE_CODE_PROCESS_WRAPPER requires Claude Code v2.1.208 or later. Earlier versions ignore the variable and start every process unwrapped. The equivalent processWrapper setting requires v2.1.210 or later; earlier versions ignore it as an unknown key, apply no launcher and report no error.
The feature works on macOS and Linux. On Windows, the variable is ignored, because the launcher contract depends on exec, which Windows does not support. A Windows machine with the variable set runs every process unwrapped and keeps working, and the only signal is a warning in the debug log.
The proxy a workstation uses is a different setting, covered by the corporate proxy page.
Which processes it covers
The variable covers the processes Claude Code starts from its own binary. Those are different from the claude you type in a terminal, which is not wrapped; a PATH shim is the separate road for that.
With CLAUDE_CODE_PROCESS_WRAPPER set, Claude Code starts each of these through your launcher:
- The background service that
claude agentsand background sessions start on demand. - The terminal host and the Claude Code session inside every agent view row, including the warm standby sessions the service keeps ready.
- Sessions the service respawns after an update or a crash.
- The relaunch Claude Code performs of itself to finish installing an update, including agent view's restart-for-update action.
- The session processes that Remote Control starts, which requires Claude Code v2.1.210 or later.
- The split-pane teammate sessions that agent teams start in tmux or iTerm2, which also requires v2.1.210 or later.
These processes do not start through the launcher:
- A session you start yourself in a terminal, which runs however you invoked it. To cover these, put a script named
claudein a directory earlier onPATHthat runs your launcher with the real binary; do not replace the managed symlink. - A session opened from a
claude-cli://deep link, which starts in a new terminal without your launcher. To prevent deep links from opening sessions for a new user, setdisableDeepLinkRegistrationto"disable"in a settings file before that user first runs Claude Code. That setting does not remove a handler the user already has. - The relaunch that
--worktreecombined with--tmuxperforms, because the terminal multiplexer starts that pane. - The native-messaging host that Claude in Chrome registers, because the browser starts it.
With a launcher configured, ps and Activity Monitor no longer show Claude Code's claude bg-pty-host and claude bg-spare labels for the background helper processes, because the launcher's exec rebuilds the argument list. The processes are otherwise unchanged, and Claude Code identifies its own processes by binary path, never by display name.
Write the launcher script
Create an executable script at an absolute path, such as /opt/corp/launcher. Claude Code runs it with the full Claude Code command as its arguments, and the script must end by calling exec "$@" so it replaces itself with Claude Code:
#!/bin/sh
# Your organization's setup: enter the sandbox, apply
# network controls, or inject credentials.
exec "$@"Make it executable with chmod +x. The setup portion is whatever your launcher must do before Claude Code runs. The contract below is strict about it: the setup must not print to standard output or read standard input before the exec.
If you previously replaced the ~/.local/bin/claude symlink with your launcher, restore the original symlink in the same change. A replaced symlink makes the first wrapped session start the background service through both launchers at once, and it puts the installation into an externally managed state: /doctor reports it, auto-update leaves the file in place, and cleanup of old versions stays disabled until the installer manages that path again.
Set the variable in settings
Set the variable in the env block of a settings file so the detached background service inherits it. A shell export is not enough: the background service starts on demand, outlives your shell and never re-reads shell profiles.
For one machine, add it to ~/.claude/settings.json. To deploy it to every machine in your organization, put the same block in managed settings:
{
"env": {
"CLAUDE_CODE_PROCESS_WRAPPER": "/opt/corp/launcher"
}
}When more than one source sets the variable, the managed settings value overrides both ~/.claude/settings.json and a value exported in the shell, so users cannot point self-spawns at a different launcher.
The processWrapper setting carries the same value as a named, top-level settings key. Set it when your organization pushes settings as individual keys rather than an env block. CLAUDE_CODE_PROCESS_WRAPPER takes precedence when both are set.
{
"processWrapper": "/opt/corp/launcher"
}Because processWrapper is a named setting, an organization that delivers it through remote managed settings sees it listed on the security approval dialog alongside the other settings that run administrator-supplied executables.
Project and local settings cannot configure the launcher. A file committed to a repository must not be able to put a binary in front of every Claude Code process on the machine, so Claude Code ignores CLAUDE_CODE_PROCESS_WRAPPER in .claude/settings.json or .claude/settings.local.json with a warning in the debug log, and never reads the processWrapper key from those files.
Restart the background service and your sessions
A running background service and any open claude sessions read the variable once at startup, so they keep launching unwrapped processes until restarted. Run claude daemon stop --any to stop the on-demand service. The next command that needs it, such as claude agents, starts a wrapped one. Then close and reopen your open claude sessions.
claude daemon stop --anyOn machines you cannot restart yourself, the first session started after the settings push retires a leftover unwrapped on-demand service automatically. A machine where no new session starts keeps its unwrapped background service until one does.
Verify it is applied
Run /status in a session. The Self-exec entry shows the resolved launch command and warns when the running background service does not match it.
claude daemon status prints the same information from the shell, including after you unset the variable, when /status no longer shows the entry.
The launcher contract
When the launcher cannot run, Claude Code refuses to start the process instead of starting it unwrapped. On Windows the variable is ignored and processes start unwrapped. Claude Code holds the script to these rules:
- End with
exec "$@". A launcher that forks a child and exits leaves an orphaned Claude Code process the background service cannot track. Agent view marks such a session failed with a message naming the launcher. - Do not reorder, absorb or add to Claude Code's arguments. Remove the launcher's own arguments, which come first, and pass the rest to
execas it arrived. - Pass every inherited environment variable through. Adding variables such as injected credentials is fine; dropping inherited ones is not. The per-session authentication tokens, the model and provider selection, and
CLAUDE_CODE_PROCESS_WRAPPERitself all travel on the inherited environment. - Reach
execwithin about three seconds each time the launcher runs. A background session can run the launcher three times in series before its first output, so do slow work lazily or from a cache. - Tolerate being invoked from inside itself. Claude Code applies the launcher to every nested self-spawn, so a launcher that acquires an exclusive resource must detect that it already holds it.
- Do not write to the terminal or standard output before Claude Code starts. Anything printed before the
execis reported as the crash cause if the session dies before initializing. - Do not depend on how arguments are spelled. A flag's value can arrive as its own argument or joined to the flag, and the form can change between versions.
- Run
execfrom the directory the launcher started in. A launcher that changes directory can start a session in the wrong project. - Do not read standard input. A command that reads it before the
exec, such as one that asks for a password, can leave the session stuck. Redirect such a command's input from/dev/null. - Call other programs by absolute path. The launcher can start with a
PATHthat lacks the directories your shell profile adds.
Pass arguments to the launcher
CLAUDE_CODE_PROCESS_WRAPPER and the processWrapper setting take the same format. For most launchers, the value is the script's absolute path. To pass the launcher arguments of its own, write them after the path. Claude Code parses the value as an argument list, not a shell command.
Whitespace separates tokens, and double quotes group a token that contains spaces. A single quote is an ordinary character, so 'a b' is two tokens. A value that starts with [ is read as a JSON string array, such as ["/opt/corp/launcher", "--profile", "cc"]. Shell syntax does not work: there is no variable expansion or globbing, and an unquoted operator such as ;, |, & or $( is rejected as a configuration error.
In a settings file, the environment variable takes the array form as a JSON string with escaped quotes:
{
"env": {
"CLAUDE_CODE_PROCESS_WRAPPER": "[\"/opt/corp/launcher\", \"--profile\", \"cc\"]"
}
}The processWrapper key takes that same value string.
Write the launcher's own arguments after its path, and remove them in the script before the exec call. This script is written for the value /opt/corp/launcher --profile cc:
#!/bin/sh
if [ "$1" = "--profile" ]; then
profile="$2"
shift 2
fi
# Your organization's setup for "$profile".
exec "$@"When the value cannot be used, Claude Code refuses to start the affected process and reports the reason.
How it differs from CLAUDE_CODE_SHELL_PREFIX
CLAUDE_CODE_PROCESS_WRAPPER wraps Claude Code's own processes and passes the command through as separate argv tokens for the launcher to exec.
CLAUDE_CODE_SHELL_PREFIX wraps the shell commands Claude runs on your behalf, such as Bash tool calls, hooks, and the commands that start stdio MCP servers, and passes each one as a single shell-quoted string in $1 for the wrapper to re-evaluate. A launcher written for one does not work as the other.
Common mistakes
- Exporting the variable in a shell profile. The background service outlives your shell and never re-reads shell profiles, so put it in the settings file's
envblock. - Wrapping only the
claudecommand onPATH. The background service and agent view sessions start from the binary's direct path, so they never reach aPATHwrapper. - Putting the key in a project settings file. Claude Code ignores it there, and never reads
processWrapperfrom project or local settings. - Forgetting to restart. A running service and open sessions keep launching unwrapped processes until restarted.
- Counting Windows machines as wrapped. The variable is ignored on Windows, so plan the rollout as if those machines are unwrapped.
Where these answers come from
- Anthropic's corporate launcher page, read November 26, 2026: what the setting covers and excludes, the two settings forms, the version requirements, the Windows behavior, the setup steps, the restart and verify steps, the launcher contract, the value format and the difference from
CLAUDE_CODE_SHELL_PREFIX. - The environment variables reference, the
CLAUDE_CODE_PROCESS_WRAPPERentry, read November 26, 2026: the variable's name and scope.
Common questions
Which processes does CLAUDE_CODE_PROCESS_WRAPPER cover?
It covers the background service, every agent view session and the warm standby sessions, sessions the service respawns, the relaunch after an update, Remote Control sessions and agent team panes. It does not cover a session you start yourself, a session opened from a deep link, or the relaunch that --worktree with --tmux performs.
Why must the launcher end with exec?
A launcher that forks a child and exits leaves an orphaned Claude Code process the background service cannot track. Agent view marks that session failed with a message naming the launcher.
Does the launcher work on Windows?
No. On Windows the variable is ignored and processes start unwrapped, because the launcher contract depends on exec. The only signal is a warning in the debug log, so count Windows machines as unwrapped when you plan a rollout.
How do I check that the launcher is applied?
Run /status in a session. The Self-exec entry shows the resolved launch command and warns when the running background service does not match it. claude daemon status prints the same information from the shell.