Skip to content

Add Codex ACP setup, mode controls, and expandable tool activity - #142

Merged
DevMando merged 14 commits into
mainfrom
codex/acp-codex-support
Nov 13, 2026
Merged

DevMando merged 14 commits into
mainfrom
codex/acp-codex-support

Conversation

@DevMando

@DevMando DevMando commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Builds on the ACP client merged in #140 to make external-agent sessions easier to set up, understand, and control. Codex works through the existing ACP transport; this PR adds tested setup guidance and improves the shared ACP experience.

Connection summary preview

Codex ACP connection card showing the selected model, current mode, session details, and session controls

What users will see

  • Codex setup guidance: /agent-acp add codex explains how to install the pinned adapter and register it. Codex handles authentication. Nothing is installed or configured automatically by this command.
  • A clearer connection summary: A compact card shows the connected agent, selected model, current mode and description, session origin, and commands to change mode or return to the native conversation.
  • A cleaner pane header: Show the agent's readable name, selected model, and ACP indicator. Adapter package names, versions, project folders, and approval modes no longer crowd the header.
  • Mode selection: /agent-acp-mode opens the agent's advertised permission and behavior modes. Direct selection also works, such as /agent-acp-mode read-only. Changes keep the conversation and are refused during active work.
  • Expandable tool activity: Each ACP tool call has one row that updates in place. Expand it for the command, bounded available output, and completed diffs. Permission denial, cancellation, interruption, and unfinished calls remain explicit.

Previously, a long tool command could fill several transcript lines followed by separate running and completion messages. It now appears as a concise activity row with one current status.

Implementation and scope

  • Use agent-advertised titles, models, and modes, with a session-mode fallback for agents without a mode configuration option.
  • Keep tool identities scoped to one pane and turn. Sparse updates preserve earlier fields, and reused ids in later turns create new rows.
  • Preserve the native conversation and native tool-group behavior.
  • Update the changelog under [Unreleased] and document Codex installation, authentication, and validation limits.
  • Preserve the focused commit history for setup, session controls, presentation, tool state, integration, tests, and documentation.

This branch includes current main, including RazorConsole 0.7.0 and the retained deferred-focus safeguard.

Validation

  • Full suite on .NET 10 and .NET 8: 1,919 passed, one skipped, zero failed on each. The skip is the existing symlink-creation test on this Windows machine; a junction guard is covered separately.
  • 95 targeted checks pass on both frameworks for activity state, permissions, transcript rendering, expansion, diffs, and exports.
  • Tested @agentclientprotocol/codex-acp 2.6.0 on Windows with existing login state: initialization, session creation through MandoCode's actual ACP client, a short streamed reply, read-only mode, and clean session closure. API-key variables were removed from the smoke-test process.
  • Confirmed the installed adapter accepts a session-scoped mode configuration change.
  • git diff --check passes.

Remaining limits

Terminal references still cannot be resolved into terminal output; the unavailable-output notice now lives inside expanded details. This does not add image support, context handoff, or the proposed MandoCode MCP bridge. Full interactive permission, cancellation, resume, and folder-change flows still need adapter-specific manual validation.

Add discoverable /agent-acp add codex guidance with an explicit, pinned npm installation and native node launch command. Authentication stays with Codex, and setup guidance never installs software or saves an entry automatically.

Cover guidance without configuration side effects and preserve ordinary explicit Codex executable registration. Command tests passed on net8.0 and net10.0.
Describe a pinned local adapter install, native Node registration, external Codex login, shared ACP command boundaries, and API-key environment behavior. Link the guide from the ACP quick start and record the addition under Unreleased.

Document real Windows validation with codex-acp 2.6.0: initialization, session creation through MandoCode's actual client, read-only mode, a streamed reply, and session closure. Distinguish verified text flow from interactive commands still requiring manual validation.
Record the passing focused tests and actual full-run failures, plus baseline comparison results. Keep live adapter success separate from unresolved config-save and notification timing test failures; do not claim a clean full suite.
Read ACP's optional human-readable implementation title and fall back to the protocol name. Show the advertised current model and a compact ACP indicator without repeating the pane name, folder, approval mode, or adapter version.

Keep full adapter metadata available for connection diagnostics. Verify 221 protocol, schema, runtime and pane checks on each of net8.0 and net10.0. Preserve local launch settings outside this commit.
Add /agent-acp mode with advertised descriptions, current selection, cancellation, and optional direct selection by name or id. Prefer mode config options and fall back to session/set_mode without resetting the conversation or changing native settings.

Refuse changes during active work and report unsupported or rejected modes. Cover picker selection, cancellation, no-op and unknown choices, fallback routing, agent refusal, and real App command dispatch. All 273 targeted checks pass on net8.0 and net10.0; the installed Codex adapter accepts a read-only config change.
Document /agent-acp mode, session-only permission ownership, busy-pane restrictions, agent capability fallback, and live Codex mode-change results under Unreleased. Distinguish automated coverage and adapter verification from manual terminal validation.
Promote mode selection to its own slash command with direct argument support, autocomplete descriptions, and updated docs. Remove the temporary agent-acp mode subcommand and host plumbing.

Replace verbose launch lines with a rounded connection card showing the agent display name, model, advertised mode and description, session origin, context boundary, and mode/stop commands. Keep permission details visible at connection time without adding them back to the pane header.

Verify 157 command, mode, startup, workspace and pane checks on each supported framework. Include rendered card checks and direct-command dispatch coverage; preserve local launch settings outside the commit.
Map each ACP toolCallId to a stable activity object within one pane and turn. Merge sparse updates into immutable render snapshots, preserve full command input and bounded text output, and track permission decisions and terminal-output availability.

Keep final outcomes stable across late updates and settle unfinished calls explicitly on cancellation or interruption. This commit introduces the state layer; transcript and rendering integration follows separately.
…ties

Publish structured ACP calls into stable TuiSession entries and merge updates without appending status lines. Add width-aware activity rows using the existing workspace button interaction and expandable command/output details.

Route permission requests and decisions into activity status, retain diffs through the existing adapter, and settle unfinished calls on every turn exit. Keep legacy sinks and native tool groups compatible. Initial driver and transcript checks pass on net8.0 and net10.0; focused structured-activity regressions follow.
Keep Awaiting approval visible until the actual permission decision arrives, even if a progress notification races with the open menu. Shorten long status labels in narrow panes and reserve width for the current outcome.
Cover sparse and interleaved updates, repeated ids across turns and panes, denied permissions, bounded output, late updates, incomplete and interrupted turns, and diffs attached to completed calls.

Render the real activity component to verify details stay expanded as status changes without creating another row. All 95 targeted activity, driver, permission, native transcript and export checks pass on net8.0 and net10.0.
Document per-call status updates, expansion controls, bounded input/output, attached diffs, real permission states, terminal-reference limitations, and end-of-turn outcomes. Record the UI improvement under Unreleased.
Update Unreleased highlights for Codex setup, mode selection and persistent tool activity. Record the final full run of 1,919 passing tests and one existing symlink skip on each framework, while retaining earlier test observations as history.
Include the user-provided image showing model, approval mode, session origin, native context boundary and the final /agent-acp-mode command for PR review.
@DevMando
DevMando merged commit 0b3ad73 into main Nov 13, 2026
4 checks passed
@DevMando
DevMando deleted the codex/acp-codex-support branch November 13, 2026 05:30
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