Skip to content

[Feature]: Add sandbox preset profiles for common configurations #366

@sjnims

Description

@sjnims

Parent Issue

Sub-issue of #344 (Leverage Additional SDK v0.2.25 Capabilities)
Follow-up to #350 (Configure sandbox settings for execution safety)

Feature Type

Configuration schema (config.yaml)

Problem or Need

The sandbox configuration added in #350 requires users to manually specify all SDK sandbox fields (enabled, autoAllowBashIfSandboxed, network settings, etc.). For common use cases, this is verbose and error-prone. Users need to understand the SDK's sandbox semantics to configure it correctly.

For example, a "lock down everything except network" configuration currently requires:

execution:
  sandbox:
    enabled: true
    auto_allow_bash_if_sandboxed: true
    allow_unsandboxed_commands: false
    network:
      allowed_domains: ["*"]

Proposed Solution

Add named preset profiles that expand to preconfigured SandboxConfig values:

execution:
  sandbox:
    preset: "standard"  # or "strict", "permissive"

Suggested presets:

Preset enabled auto_allow_bash_if_sandboxed Network Notes
permissive true true unrestricted Minimal sandbox, just enables the feature
standard true true unrestricted Default choice for most plugin evaluations
strict true false restricted For evaluating untrusted plugins

Implementation approach:

  1. Add SandboxPresetSchema enum to src/config/schema.ts
  2. Add preset field to SandboxConfigSchema (mutually exclusive with manual fields, or preset provides defaults that manual fields override)
  3. Add preset expansion logic in src/stages/3-execution/environment-options.ts before the snake→camelCase mapping
  4. Add tests for each preset and preset + override combinations

Design decision needed: Should preset be a base that individual fields override, or should preset and manual fields be mutually exclusive?

Pipeline Stage Affected

Stage 3 - Execution

Component Type (if applicable)

Not component-specific

Alternatives Considered

  • No presets (current state from [Feature]: Configure sandbox settings for execution safety #350): Works but verbose for common cases
  • CLI flags only: --sandbox-preset strict — simpler but less configurable
  • Preset + override hybrid: Preset sets baseline, individual fields override — most flexible but more complex validation

How important is this feature to you?

Low - Just a suggestion

Additional Context

This was explicitly deferred from #350 to keep the initial implementation simple. The base SandboxConfig schema and buildSandboxOptions() mapping are already in place, making preset expansion straightforward to add on top.


🤖 Created with Claude Code

Metadata

Metadata

Assignees

Labels

component:configConfiguration loading (src/config/)effort:medium1-4 hoursenhancementNew feature or requestpriority:lowNice to havesdk:agentClaude Agent SDK usage (Stage 3)stage:executionStage 3: Agent SDK execution with tool capturestatus:analyzedIssue has been analyzed by Claudestatus:needs-designNeeds design/architecture decision

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions