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
I've opened PR #1934 implementing this: an optional [sandbox] config section that runs Bash commands under an OS-level sandbox (bubblewrap on Linux, sandbox-exec on macOS) — workspace-only writes in workspace-write mode, deny_read masking for sensitive paths (ssh keys, .env, credentials), and network off by default — plus matching permission policies so file tools get hard denies and outside-workspace asks.
One design point worth maintainer input: the issue title asks for sandboxing by default, while the PR ships it opt-in (enabled = false) as a conservative first step (fail-open when bwrap/sandbox-exec is unavailable, so nothing breaks on hosts without it). Happy to flip the default or add an onboarding prompt in a follow-up if that's the preferred direction.
#4115 implements this: an experimental [sandbox] config section with workspace-write (default when enabled) / read-only / danger-full-access modes — commands spawned via the Bash tool run inside macOS Seatbelt or Linux bwrap, so writes outside the workspace fail at the OS level even under Auto/YOLO. Off by default behind KIMI_CODE_EXPERIMENTAL_SANDBOX; context in #4114.
Activity
xuwenhao commentedon Jul 23, 2026
I've opened PR #1934 implementing this: an optional
[sandbox]config section that runs Bash commands under an OS-level sandbox (bubblewrap on Linux, sandbox-exec on macOS) — workspace-only writes inworkspace-writemode,deny_readmasking for sensitive paths (ssh keys,.env, credentials), and network off by default — plus matching permission policies so file tools get hard denies and outside-workspace asks.One design point worth maintainer input: the issue title asks for sandboxing by default, while the PR ships it opt-in (
enabled = false) as a conservative first step (fail-open whenbwrap/sandbox-exec is unavailable, so nothing breaks on hosts without it). Happy to flip the default or add an onboarding prompt in a follow-up if that's the preferred direction.Ram-Pavith commentedon Oct 3, 2026
#4115 implements this: an experimental
[sandbox]config section withworkspace-write(default when enabled) /read-only/danger-full-accessmodes — commands spawned via the Bash tool run inside macOS Seatbelt or Linux bwrap, so writes outside the workspace fail at the OS level even under Auto/YOLO. Off by default behindKIMI_CODE_EXPERIMENTAL_SANDBOX; context in #4114.