Skip to content

fix(agent-mode): support current Codex ACP modes - #2673

Merged
logancyang merged 2 commits into
v4-previewfrom
codex/fix-2672-codex-acp-modes
Jul 24, 2026
Merged

fix(agent-mode): support current Codex ACP modes#2673
logancyang merged 2 commits into
v4-previewfrom
codex/fix-2672-codex-acp-modes

Conversation

@logancyang

@logancyang logancyang commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • map Codex's canonical Default, Plan, and Auto choices from the live ACP mode inventory
  • support both the current agent / agent-full-access IDs and the legacy auto / full-access IDs
  • deliver Copilot's composed prompt and startup safety defaults through CODEX_CONFIG for current adapters while retaining legacy -c arguments
  • preserve unrelated user Codex config keys and reject malformed/non-object JSON clearly
  • prefer a genuine native plan mode when one is advertised
  • initialize current codex-acp sessions in agent mode while preserving user mode overrides
  • update the non-Windows install command to @agentclientprotocol/codex-acp
  • document Agent Mode's operating-mode picker

Root cause

The Codex descriptor hard-coded the legacy Zed adapter's native mode IDs. Current @agentclientprotocol/codex-acp releases advertise read-only, agent, and agent-full-access. The shared translator filters canonical modes against that inventory, so read-only was the only matching ID and Plan became the only visible picker option.

The current adapter also ignores arbitrary argv in ACP server mode and reads Codex session config from CODEX_CONFIG. Without the dual config transport, switching the recommended install package would drop Copilot's prompt wiring.

User impact

Codex users can switch among Default, Plan, and Auto again instead of becoming trapped in Plan. Copilot's Obsidian framing, custom prompt, and pill syntax reach both current and legacy adapter families. Existing installations using the legacy adapter retain their prior behavior.

Validation

  • npm test -- --runInBand src/agentMode/backends/codex/CodexBackend.test.ts src/agentMode/backends/codex/codexModeMapping.test.ts src/agentMode/session/translateBackendState.test.ts — 66 tests passed
  • npm run build — passed
  • focused Prettier and ESLint plus staged pre-commit checks — passed
  • isolated live plugin reload in logan-dev-vault — no uncaught errors or error-console entries
  • full npm run lint remains blocked in the existing eslint-plugin-obsidianmd package.json flat-config path before project source is analyzed

Fixes logancyang/obsidian-copilot-preview#212

@logancyang
logancyang force-pushed the codex/fix-2672-codex-acp-modes branch from d5859c8 to 736bc01 Compare July 11, 2026 22:20
@logancyang
logancyang marked this pull request as ready for review July 11, 2026 22:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 736bc01e6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agentMode/backends/codex/descriptor.ts
@logancyang
logancyang requested a review from zeroliu July 12, 2026 21:12
@logancyang
logancyang merged commit 9c315d3 into v4-preview Jul 24, 2026
2 checks passed
@logancyang
logancyang deleted the codex/fix-2672-codex-acp-modes branch July 24, 2026 00:01
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