Skip to main content

Module cli_messaging

Module cli_messaging 

Source
Expand description

AgentMux agents message each other through jekt, so the Claude CLI’s own separate cross-session messaging is turned off by default.

The switch is an environment variable the CLI reads at launch. Its name is an internal of the CLI, not a documented setting, so it can change from one CLI version to the next: when the pinned CLI version moves, the tests below (the canary) and this note must be rechecked against the new CLI.

Setting agent:climessaging: false (the default) launches Claude agents with the variable set to 0; true leaves it unset, so the CLI behaves as it does outside AgentMux.

Constants§

ENV_GATE
The CLI’s own gate for its cross-session messaging (set to 0 to turn it off). An undocumented name: recheck on every CLI upgrade.
SETTING_CLI_MESSAGING
The setting. Off by default.

Functions§

apply
Turn the CLI’s messaging off in a launch environment: a Claude agent’s, when the setting is off. It overwrites what the environment already carries (a persisted cmd:env), as the setting is the only way to turn it back on. Any other provider’s launch is left alone.
apply_for_spawn
apply for a block’s launch, reading the provider from its meta and the setting now.
enabled
Whether the CLI’s own messaging stays on: only a boolean true turns it on.
install_config
Attach the live settings (bootstrap), so SETTING_CLI_MESSAGING is read at each launch.
is_cli_session_dir
Whether a volume source is a host folder the CLI keeps its sessions’ sockets in, or inside one: /tmp/cc-socks, the user’s runtime folder ($XDG_RUNTIME_DIR, /run/user/*).
refused_volume_source
The first of a container’s volume sources that is such a folder, which the container may not mount.