Conversation
m62624
force-pushed
the
feat/cageforge-cli-sandbox
branch
from
September 23, 2026 09:17
75c7dd1 to
50a08e4
Compare
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
m62624
force-pushed
the
feat/cageforge-cli-sandbox
branch
from
September 23, 2026 10:27
d267083 to
1b8f53e
Compare
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
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.
📋 Pull Request
Description
This is a contribution for the BOSS Console Hackathon.
The Cageforge JVM binding was prepared for this hackathon in PR #22. This PR brings that binding into BOSS for opt-in sandboxed command sessions.
The on-demand permission flow uses the API introduced in Cageforge PR #51. The operator-facing
sandbox_request_permissionstool sends the exact command, requested rights and reason to BOSS for human approval (once or until BOSS closes). An approved command gets its own immutable sandbox; the requesting agent is not restarted or widened. Dedicated agent-only endpoint/token provisioning remains in progress.Add explicit opt-in sandboxed command sessions powered by Cageforge, using its Java 0.7.1 binding. Users can launch a selected root executable, including an agent CLI such as Codex, under a project-specific TOML policy. Its shell commands, compilers and other descendants inherit the same native sandbox restrictions.
The policy is fixed for the lifetime of the session. Sandboxed execution is explicitly selected by the user, and a sandbox failure never falls back to an unsandboxed launch. Existing ordinary command execution remains unchanged. The integration includes policy preparation and approval, process lifecycle management, and dedicated native security tests for Linux, macOS and Windows.
This is process-tree isolation, not application-wide or machine-wide isolation. An agent launched outside a sandbox session can execute commands without calling BOSS; only its explicit sandbox launches enter this boundary. When the agent itself is the sandbox root, its descendants remain constrained even without MCP calls. External MCP servers and already-running services are not brought inside that boundary.
The subsystem is disabled by default. Enable it explicitly from Tools > Sandbox command sessions, or start BOSS with
boss --sandbox. This does not redirect ordinary command execution. Disabling unregisters its tools, revokes approvals and stops its sandbox sessions; nothing is persisted across BOSS restarts.🔄 Type of Change
📦 Version Impact
x.x.+1x.+1.0+1.0.0✅ Testing Checklist
🧪 Local Testing
Current head:
c80d5eb1. Local verification passed: 28 sandbox module tests, 14 focused desktop sandbox tests, both modules' detekt/ktlint checks, and native test bundle compilation. The full desktop suite passed before the additional-permission delta and is being rerun. Tests cover default-off activation, startup argument preservation, explicit approval, denial/cancellation cleanup and captured-policy reuse.Fresh native CI and full BOSS CI are running for this head. The previous head
bab763a4passed both workflows. The new native test verifies that an approved additional command can read its granted file while the original agent remains denied access before, during and after that command. Current-head native results are not yet claimed.🖥️ Platform Testing
🏗️ Build Verification
🔍 Code Quality
🚀 CI/CD Integration
📸 Screenshots/Media
Before
No explicit Cageforge command-session launch surface.
After
Tools > Sandbox command sessions now opens the explicit launch form, native permission review, bounded stdout/stderr viewer, stdin controls and stop action. Additional-permission requests use the same consent dialog and explicitly state that the original agent remains unchanged. Screenshots and dedicated agent endpoint provisioning remain pending.
🔗 Related Issues
📝 Additional Context
🎯 Motivation and Context
Provide an explicit way to confine a CLI session and its descendants. MCP remains a tool transport; individual MCP invocations are not separate sandbox boundaries.
🧠 Implementation Details
The standalone JVM module lives under
modules/boss-command-sandboxand does not change the plugin sandbox. Cageforge owns TOML inheritance and platform overlays. Approval identifies an immutable snapshot of the executable, separate arguments, working directory and policy. A failed sandbox launch has no unsandboxed fallback.Cageforge tests use a separate workflow. Linux compiles dependencies and the consumer on the host, then executes the bundle in a prepared QEMU guest. macOS and Windows exercise their native backends, with explicit Windows setup and teardown. Existing BOSS workflows are unchanged.
The new production module uses resource ownership without lint suppressions or generic
catch (Throwable).None intended. Ordinary command execution stays unchanged. No manual release-version change is included.
🔮 Future Considerations
Completion checklist before leaving draft (required work, not optional follow-ups). Checked items are implemented and locally verified; unchecked items remain incomplete or await current-head verification:
composeApp:desktopTest, sandbox tests and lintThe initial session transport uses pipes; an interactive PTY is not promised. Review Focus Areas below identify requested review topics, not completed verification. All six are selected because this change affects process logic, resource use, security, three desktop platforms, GUI behavior and documentation.
👀 Review Focus Areas
🚨 Pre-merge Checklist
The required base for this contribution is the fork's
dev, notmain. The fork'sdevwas fast-forwarded to upstreamdevat8c83aef6; this branch was rebased onto it.range-diffconfirmed all 17 original contribution commits were unchanged by that rebase. Four GUI/service/MCP integration commits have since been added; the PR diff still contains only this contribution.Thank you for contributing to BOSS! 🎉