[GH-ISSUE #4120] [Other] Configurable permission presets: a workspace-write mode between Manual and Bypass #1803

Closed
opened 2026-11-04 01:54:11 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @WolleGeee on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4120

Area

[Other]

What do you want to do?

I want an agent to work through a longer task on its own, inside boundaries I
set once, without approving every tool call.

Today the three modes are all-or-nothing:

Mode Sandbox Approval
Manual danger-full-access ask
Plan read-only never
Bypass danger-full-access never

Manual asks often but the sandbox is not restricted. Plan is a real fence but
nothing can change. Bypass has neither. There is no mode that is both
restricted and autonomous.

What I am asking for:

  1. A fourth built-in mode: the workspace-write sandbox with its own approval
    policy. The Harness already has this sandbox mode, and its writable roots
    are the session workspace plus the temp directories
    (dsh-sandbox/src/roots.ts:54), so the fence already exists - it is just not
    reachable from the app.

    The behaviour we would like, stated as a goal rather than as an
    implementation:

    • workspace-write + ask: the agent works on its own inside the sandbox;
      operations that need wider permissions may still require approval.
    • workspace-write + never: the agent works on its own inside the sandbox;
      requests for wider permissions are denied.

    We have not verified whether the current Strata gate already supports these
    combinations without further changes. We are describing the wanted result,
    not proposing a particular implementation.

  2. Presets defined in configuration instead of hardcoded. Harness presets are
    a host-supplied table of { sandbox, approval } pairs. Strata writes three
    rows in apps/host/server/agent/profile.mjs (MODE_PRESETS) and regenerates
    the patch on every start. That patch is applied as the last --patch layer,
    after the user patch layer at <DSH_HOME>/cordis.patch.yml, so a user patch
    cannot add a preset today. A documented config seam would make this
    update-proof without editing shipped code.

  3. Later, if it fits: narrow, default-deny automatic approvals - a small
    allowlist of verified read-only operations, scoped to directories, valid
    for one session, reviewable and revocable. #3975 shows why matching a
    command name is not enough to prove a call is read-only.

  4. Later, if it fits: external tools and network access as a separate
    permission. MCP calls are not routed through the sandbox fence at all; only
    the gate decides on them. A restricted filesystem mode is not a boundary for
    calendar, board or web access.

The existing client appears to render permission presets dynamically from the
server-provided catalog (dsh-client-ui-permission-presets reads the composed
catalog, and defaultPreset lives in the "permission" settings namespace). This
may reduce the UI changes required, although additional integration work could
still be necessary.

Tradeoffs: more modes in the menu, and a mode that asks less is a security
decision. Existing modes and defaults stay as they are; the new mode is opt-in.

What do you do today instead?

I switch between Plan and Manual. Plan is good for reading and research: no
prompts, nothing can change. But it refuses MCP tools outright, so the calendar
and board integrations are unusable there.

Everything that writes goes back to Manual, where one task with a few file
edits and shell commands means roughly twenty confirmations. Chained read-only
commands ask as well: python3 --version; git --version prompts although each
part on its own is safe.

Bypass stops the prompts, and I do not want to give the agent unrestricted
access to the whole machine just to avoid them.

Technical context (static analysis of the shipped code, not a security audit):

  • apps/host/server/agent/profile.mjs - MODE_PRESETS, DEFAULT_MODE = 'manual'
  • apps/host/server/agent/plugins/strata-gate.mjs - per-tool approval decisions
  • Harness permission-presets docs: presets come from host config; "the
    configured preset table is fixed for the plugin lifetime"; "custom is
    derived-only"
  • dsh-sandbox/src/roots.ts:54 - writable roots for workspace-write
  • dsh-user-approval/src/index.ts:63 - under 'never', every ask resolves 'rejected'

Observed behaviour (Strata 0.2.5, macOS 27.0.1, Apple Silicon): Manual prompts
for file writes, MCP calls and chained shell commands; Plan prompts for nothing
and refuses MCP calls; an escalation attempted in Plan was rejected without any
dialog - reported separately.

Related issues: #3975, #3477, #1719. I searched open and closed issues for
permission, approval, sandbox, preset, allowlist and auto-review and found
nothing about configurable presets.

Originally created by @WolleGeee on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4120 ### Area [Other] ## What do you want to do? I want an agent to work through a longer task on its own, inside boundaries I set once, without approving every tool call. Today the three modes are all-or-nothing: Mode Sandbox Approval Manual danger-full-access ask Plan read-only never Bypass danger-full-access never Manual asks often but the sandbox is not restricted. Plan is a real fence but nothing can change. Bypass has neither. There is no mode that is both restricted and autonomous. What I am asking for: 1. A fourth built-in mode: the workspace-write sandbox with its own approval policy. The Harness already has this sandbox mode, and its writable roots are the session workspace plus the temp directories (dsh-sandbox/src/roots.ts:54), so the fence already exists - it is just not reachable from the app. The behaviour we would like, stated as a goal rather than as an implementation: - workspace-write + ask: the agent works on its own inside the sandbox; operations that need wider permissions may still require approval. - workspace-write + never: the agent works on its own inside the sandbox; requests for wider permissions are denied. We have not verified whether the current Strata gate already supports these combinations without further changes. We are describing the wanted result, not proposing a particular implementation. 2. Presets defined in configuration instead of hardcoded. Harness presets are a host-supplied table of { sandbox, approval } pairs. Strata writes three rows in apps/host/server/agent/profile.mjs (MODE_PRESETS) and regenerates the patch on every start. That patch is applied as the last --patch layer, after the user patch layer at <DSH_HOME>/cordis.patch.yml, so a user patch cannot add a preset today. A documented config seam would make this update-proof without editing shipped code. 3. Later, if it fits: narrow, default-deny automatic approvals - a small allowlist of verified read-only operations, scoped to directories, valid for one session, reviewable and revocable. #3975 shows why matching a command name is not enough to prove a call is read-only. 4. Later, if it fits: external tools and network access as a separate permission. MCP calls are not routed through the sandbox fence at all; only the gate decides on them. A restricted filesystem mode is not a boundary for calendar, board or web access. The existing client appears to render permission presets dynamically from the server-provided catalog (dsh-client-ui-permission-presets reads the composed catalog, and defaultPreset lives in the "permission" settings namespace). This may reduce the UI changes required, although additional integration work could still be necessary. Tradeoffs: more modes in the menu, and a mode that asks less is a security decision. Existing modes and defaults stay as they are; the new mode is opt-in. ## What do you do today instead? I switch between Plan and Manual. Plan is good for reading and research: no prompts, nothing can change. But it refuses MCP tools outright, so the calendar and board integrations are unusable there. Everything that writes goes back to Manual, where one task with a few file edits and shell commands means roughly twenty confirmations. Chained read-only commands ask as well: `python3 --version; git --version` prompts although each part on its own is safe. Bypass stops the prompts, and I do not want to give the agent unrestricted access to the whole machine just to avoid them. Technical context (static analysis of the shipped code, not a security audit): - apps/host/server/agent/profile.mjs - MODE_PRESETS, DEFAULT_MODE = 'manual' - apps/host/server/agent/plugins/strata-gate.mjs - per-tool approval decisions - Harness permission-presets docs: presets come from host config; "the configured preset table is fixed for the plugin lifetime"; "custom is derived-only" - dsh-sandbox/src/roots.ts:54 - writable roots for workspace-write - dsh-user-approval/src/index.ts:63 - under 'never', every ask resolves 'rejected' Observed behaviour (Strata 0.2.5, macOS 27.0.1, Apple Silicon): Manual prompts for file writes, MCP calls and chained shell commands; Plan prompts for nothing and refuses MCP calls; an escalation attempted in Plan was rejected without any dialog - reported separately. Related issues: #3975, #3477, #1719. I searched open and closed issues for permission, approval, sandbox, preset, allowlist and auto-review and found nothing about configurable presets.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Fill in "Area".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6399981800 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Fill in "Area". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6400240763 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660035724 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1803
No description provided.