[codex] Implement ACP auth and read/write session modes#35
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the ACP agent surface area by explicitly advertising no authentication methods, adding read/write session modes (defaulting to write), persisting/restoring mode changes, and filtering mutating workspace tools from model turns while in read mode.
Changes:
- Advertise
authMethods: []and reject unsupportedauthenticate()calls. - Add ACP session modes (
read,write), persistsession.mode_changed, restore mode duringloadSession(), and emitcurrent_mode_update. - Filter known first-party mutating workspace tools from the toolset presented to the model in
readmode, plus docs/API/test updates.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents lack of ACP auth methods and describes read/write session modes and their behavior. |
| packages/common/src/session-events.ts | Adds SessionModeChangedEvent to the persisted session event union. |
| packages/agent-core/src/agent.ts | Implements auth rejection, session mode state, persistence/restoration, current_mode_update, and tool filtering by mode. |
| packages/acp-agent/src/agent-prompt-cancellation.test.ts | Adds tests for authMethods, authenticate rejection, mode defaults/updates/persistence, and tool filtering behavior. |
| common/reviews/common.public.api.md | Updates the public API report to include SessionModeChangedEvent. |
| common/reviews/agent-core.public.api.md | Updates the public API report to reflect updated method signatures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the next minimum ACP surface slice for authentication and session modes.
Changes
authMethods: [].authenticate()calls instead of silently no-oping.readandwriteACP session modes, withwriteas the default.session.mode_changedevents and restores the latest mode duringloadSession().current_mode_updatewhensetSessionMode()changes a session mode.readmode.Validation
pnpm testinpackages/acp-agentpnpm buildinpackages/acp-agentnode common/scripts/install-run-rush.js build --to @fledgling/acp-agentNotes
Model selection remains separate work for #9. Permission prompts for writes/commands remain separate work for #13.