Skip to content

feat: prompt for workspace sandbox trust#291

Merged
homanp merged 2 commits into
superagent-ai:mainfrom
zxyasfas:codex/workspace-trust-sandbox-prompt
May 15, 2026
Merged

feat: prompt for workspace sandbox trust#291
homanp merged 2 commits into
superagent-ai:mainfrom
zxyasfas:codex/workspace-trust-sandbox-prompt

Conversation

@zxyasfas
Copy link
Copy Markdown
Contributor

@zxyasfas zxyasfas commented May 11, 2026

Summary

  • prompt interactive users once per new workspace to choose sandbox, host, or session-only sandbox mode
  • persist remembered workspace decisions in ~/.grok/workspace-trust.json using canonical workspace paths
  • keep explicit --sandbox / --no-sandbox, non-interactive, and unsupported-platform flows non-blocking

Fixes #273

Validation

  • npx vitest run src/utils/workspace-trust.test.ts
  • npx tsc --noEmit
  • npx biome check src/index.ts src/utils/workspace-trust.ts src/utils/workspace-trust.test.ts

Note

Medium Risk
Adds a new interactive prompt and persistence layer that changes how sandboxMode is selected for first-time interactive runs; risk is mainly around unexpected prompting or incorrect defaulting/persisted decisions affecting execution environment.

Overview
Adds a workspace trust flow for sandboxing: on the first interactive run in a directory, the CLI prompts to run in Shuru sandbox, run on host, or use session-only behavior, and can remember the choice in ~/.grok/workspace-trust.json keyed by canonical workspace paths.

Integrates this resolution into interactive startup only (headless/non-interactive runs and explicit --sandbox/--no-sandbox keep existing behavior), and includes platform gating for Shuru support plus tests and README docs for the new behavior.

Reviewed by Cursor Bugbot for commit 8914725. Bugbot is set up for automated code reviews on this repo. Configure here.

@superagent-security superagent-security Bot added the contributor:verified Contributor passed trust analysis. label May 11, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8914725. Configure here.

Comment thread src/index.ts Outdated
@homanp homanp self-assigned this May 13, 2026
@open-cla
Copy link
Copy Markdown

open-cla Bot commented May 15, 2026

Contributor License Agreement

The following contributors need CLA coverage:

Review and sign the CLA

@superagent-security superagent-security Bot added the pr:verified PR passed security analysis. label May 15, 2026
@homanp homanp merged commit 5043b07 into superagent-ai:main May 15, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt to run in sandbox mode on first run in a new directory (trust-workspace UX)

2 participants