Repository navigation
sbx engine, MCP OAuth, plugin update, ACP approvals, custom commands over ACP with allowed-tools and @file - #14
Merged
Conversation
A second engine for the Bash tool and background jobs, beside the built-in Landlock/Seatbelt/token one, which stays the default. Under "sbx" the same mode and network switch are handed to crates/sandbox, which adds a host allowlist (sandbox_allow_hosts, through its proxy), the Linux seccomp filter, .git/hooks and .git/config put back after each command, the git-redirect, agent-session and loader-injection variables stripped, and a private temp directory per command. Linux and macOS use the library in-process; incode's main hands `__sbx-enter` to sbx first, so incode is its own helper. Windows runs sbx.exe (beside incode.exe or on PATH), natively or in WSL2 per sandbox_backend. A run sbx cannot start is refused, never run unconfined; what a machine cannot enforce is named in the note. Sandbox::wrap now takes the filtered environment and returns what must live until the command exits; sbx gains Sandbox::inherit_from for that base environment. tests/sbx_engine.rs (harness = false, its own main as the helper) checks a write outside the workspace is refused (with an unconfined control), a planted hook is undone and GIT_DIR is stripped; CI runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DiH8n52ifWoCd5Kx2aHwT
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sandbox engine (
sandbox_engine = "sbx")crates/sandboxinstead of the built-in engine, which stays the default.sandbox_allow_hosts);.git/hooksand.git/configput back after each command;sbx.exe, native or in WSL2 persandbox_backend.MCP
resourceparameter;~/.incode/mcp-tokens.json, refreshed on expiry or a 401;incode mcp login/logout, with auth status inincode mcp list.oauthentry is part of its approval key, so a changed client or wider scopes is asked about again.--acpasks the client (session/request_permission: allow once, always, reject) about an unapproved project server aftersession/newhas been answered, and connects it in the background. "Always" is remembered likeincode mcp approve.notifications/initializedcould reach a server aftertools/list, which is against MCP's ordering.Plugins
incode plugin update [name] [--project]re-fetches from the recorded git or path source into a staging folder and swaps it in, or leaves the old copy if anything fails.Custom commands
--acp(listed after the built-ins, with description and hint) and expanded there like in the REPL.allowed-toolsis enforced for that one turn through the toolbox, on the API and Claude routes and in-t.@pathincludes in the command file's text:.., outside absolute paths and symlinks pointing out are refused);@mentionsare left alone, and typed arguments are never read as files.Tests
Test plan
cargo fmt --check,cargo clippy --all-targets(no warnings)cargo test --lib: 2100 passed;cargo test --bins: 50 passedcargo test --test sbx_engine: live Linux checks (a write outside is refused, with an unconfined control; a hook is undone;GIT_DIRis stripped)cargo test -p incord-sandbox: 78 passedcargo check --target x86_64-pc-windows-gnu --all-targets(at the sbx engine commit)sbx.exepath and browser opening, on a real machine--acpapproval and custom commands with a real editor;plugin updateagainst a real remote🤖 Generated with Claude Code
https://claude.ai/code/session_011DiH8n52ifWoCd5Kx2aHwT