Skip to content

Honor workspace-write sandbox config on every turn - #368

Open
Greg-Moskalenko wants to merge 3 commits into
agentclientprotocol:mainfrom
Greg-Moskalenko:fix/workspace-write-network-config
Open

Honor workspace-write sandbox config on every turn#368
Greg-Moskalenko wants to merge 3 commits into
agentclientprotocol:mainfrom
Greg-Moskalenko:fix/workspace-write-network-config

Conversation

@Greg-Moskalenko

@Greg-Moskalenko Greg-Moskalenko commented Aug 5, 2026

Copy link
Copy Markdown

What changed

  • preserve explicit sandbox_workspace_write.network_access = true when codex-acp builds each workspace-write turn policy
  • merge explicit absolute sandbox_workspace_write.writable_roots into that same per-turn policy, with exact deduplication
  • preserve on-request approvals, ACP additional directories, and the existing temporary-directory flags
  • leave read-only and full-access modes unchanged; ignore malformed, non-string, and non-absolute configured roots

Why

codex-acp passes a mode-specific sandbox policy on every turn. The default Agent mode hardcodes networkAccess: false and an empty root list, so it overrides a caller's valid session-level workspace-write network and root configuration. A client can therefore create a correctly configured thread but receive turns that lack both its requested network access and isolated writable roots.

This change carries only the explicit workspace-write settings into the per-turn workspace-write policy. It does not select danger-full-access, widen another mode, or alter the approval policy.

Validation

  • npm run typecheck
  • npm test (38 files passed, 6 skipped; 349 tests passed, 28 skipped)
  • npm run bundle:all (Linux x64/arm64, macOS x64/arm64, Windows x64/arm64)
  • independent read-only review: no findings

Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
@Greg-Moskalenko
Greg-Moskalenko marked this pull request as ready for review August 5, 2026 21:31
Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
@Greg-Moskalenko Greg-Moskalenko changed the title Honor workspace-write network config on every turn Honor workspace-write sandbox config on every turn Aug 5, 2026
Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant