You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bot shells can drive the terminal multiplexer (cmux, Herdr) outside the sandbox #304
Raised by the Codex security review on #300 (thread).
What: when the daemon was started inside cmux, a bot's shell inherits cmux's socket path and CMUX_SOCKET_CAPABILITY. The daemon strips only the place variables (CMUX_SURFACE_ID and the rest), so an ungated shell command can call cmux rpc surface.create with initial_input, or cmux send into a shell tab. That runs as the person, outside the task's sandbox, and can read other tabs.
Same class as Herdr: the herdr-panes skill already has agents drive Herdr from their shell, and Herdr's socket is reachable the same way. The cmux-tabs skill relies on this on purpose: agents read, wait on and stop their own tabs with the CLI.
Possible fix: strip the multiplexer's connection credentials (CMUX_SOCKET_CAPABILITY, CMUX_SOCKET_PATH, Herdr's socket) from bot environments, and broker scoped read, send and close calls through Sonny's gated tools (run_in_pane already creates tabs). That changes both skills.
Logged per the project's stance on security edges (log, don't block the PR), like #279.
This gets wider with cmux's Automation mode, which is the setting #323 tells cmux users to turn on so agents' shells can reach cmux. In that mode, every sandboxed shell call of every agent can run cmux send/read-screen on any tab. That includes the person's own unsandboxed shell tabs, so a confined shell call (which skips approval) can type a command into a host shell and escape the sandbox. The calls Sonny itself answers (run_in_pane, show_agent) are gated; direct CLI use from shells is not.
A fix that keeps cmux's ancestry check would broker agents' cmux use (read, send and close on their own surfaces only) through Sonny's gated tools, answered by a lookout started inside cmux. George chose Automation mode for now (2026-10-29), so this is logged here rather than built.
Activity
lydakis commentedon Oct 29, 2026
This gets wider with cmux's Automation mode, which is the setting #323 tells cmux users to turn on so agents' shells can reach cmux. In that mode, every sandboxed shell call of every agent can run
cmux send/read-screenon any tab. That includes the person's own unsandboxed shell tabs, so a confinedshellcall (which skips approval) can type a command into a host shell and escape the sandbox. The calls Sonny itself answers (run_in_pane,show_agent) are gated; direct CLI use from shells is not.A fix that keeps cmux's ancestry check would broker agents' cmux use (read, send and close on their own surfaces only) through Sonny's gated tools, answered by a lookout started inside cmux. George chose Automation mode for now (2026-10-29), so this is logged here rather than built.
Generated by Claude Code