Repository navigation
Conversation
|
We need this too, to keep a session's reads inside its project. Our app runs Codex as an agent in rooms other people can talk to. When someone other than the Mac's owner asks for something, Codex shouldn't be able to read the rest of the disk. Today codex-acp's Read-only policy reads everywhere, and we can't narrow it. Checked with codex-acp 2.2.2 and codex 0.160.1:
So a launcher-supplied mapping from modes to profiles is all we'd need: our launcher would map This branch conflicts with |
## Summary Implements #519. - List allowed, user-defined Codex permission profiles using `permissionProfile/list` - Expose those profiles in ACP mode selectors, including their configured descriptions - Restore the active profile when starting or resuming a session - Send named profiles through `turn/start` without combining them with legacy sandbox policies - Preserve additional workspace roots and the effective approval policy - Keep the existing read-only, agent, and full-access modes unchanged Built-in and disallowed profiles are omitted from the additional profile entries. Related to #310. PR #357 maps the existing fixed ACP modes to configured profiles. This change instead discovers allowed custom profiles dynamically and exposes them as selectable ACP modes. ## Testing - `npm run typecheck` - `npm test` — 404 passed, 28 skipped - `npm run build` - Native macOS ARM bundle - Real Codex 0.147 app-server profile discovery and selection - End-to-end Zed test with a custom permission profile
Summary
Motivation
Named Codex permission profiles can express runtime policy that the legacy ACP
sandboxPolicycannot represent. ACP hosts need a launch-wide way to select those profiles consistently without making codex-acp own any operator-specific policy.The launcher supplies
CODEX_ACP_PERMISSION_PROFILE_CONFIGwith app-server-coverrides and a complete mapping for the three ACP modes. codex-acp validates the mapping at startup, removes the launch variable from the Codex child environment, and uses the experimental app-server permission-profile fields for thread creation, resume, mode changes, and turns.Compatibility
This is opt-in. Without
CODEX_ACP_PERMISSION_PROFILE_CONFIG, codex-acp continues to send the existing per-turn sandbox policy unchanged. Invalid or incomplete profile mappings fail startup instead of silently weakening the requested policy.Validation
npm run typechecknpm test(342 passed, 28 skipped)npm run buildCreated by Codex . GPT-5.6