Skip to content

feat(cli): add /sandbox status command (#3316)#3585

Merged
esengine merged 1 commit into
esengine:main-v2from
ashishexee:feat/3316-sandbox-inspect
Jun 9, 2026
Merged

feat(cli): add /sandbox status command (#3316)#3585
esengine merged 1 commit into
esengine:main-v2from
ashishexee:feat/3316-sandbox-inspect

Conversation

@ashishexee

Copy link
Copy Markdown
Contributor

Closes #3316

Problem

The CLI has no way to inspect sandbox status. Phase 0 (file-writer confinement) never reports itself — users cannot tell whether file writes are confined or what the boundaries are. Phase 1 (OS bash sandbox) only surfaces via a single stderr warning on unsupported platforms. The desktop has a full SandboxView UI; the CLI has nothing equivalent.

Solution

Adds a /sandbox slash command to the CLI chat TUI that displays both sandbox phases:

sandbox
phase 0 file-writer confinement
write_roots /home/user/project
workspace_root /home/user/project
allow_write /tmp
phase 1 OS bash sandbox
bash enforce (inactive: no OS sandbox on this host — bash runs unconfined)
network true

Changes

  • chat_tui.go — case /sandbox + showSandboxStatus() method, cfg *config.Config field, sandbox + config imports
  • cli.go — m.cfg = cfg initialization
  • complete.go — /sandbox autocomplete entry
  • help_view.go — /sandbox in help items
  • i18n.go — CmdSandbox field
  • messages_en.go — CmdSandbox: show sandbox status
  • messages_zh.go — CmdSandbox: 查看沙箱状态

Testing

  • gofmt -l — clean
  • go vet ./internal/cli/... ./internal/i18n/... — clean
  • go test ./internal/cli/... ./internal/i18n/... — passes

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development tui Terminal UI / CLI (internal/cli, internal/control) labels Jun 8, 2026

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice — a read-only /sandbox status that surfaces both the file-writer confinement and the OS bash-sandbox phase (incl. the inactive-on-this-host note) is genuinely useful. Built + verified the wiring locally. Closes #3316, thanks!

@esengine esengine merged commit acc0aeb into esengine:main-v2 Jun 9, 2026
10 checks passed
@ashishexee

Copy link
Copy Markdown
Contributor Author

glad to be of help!!!

@ashishexee ashishexee deleted the feat/3316-sandbox-inspect branch June 9, 2026 17:13
dorokuma pushed a commit to dorokuma/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: no way to inspect sandbox status (Phase 0 file-writer confinement)

2 participants