Skip to content

feat(control): add an external Codex operator MCP and managed skill - #794

Merged
Juliusolsson05 merged 15 commits into
mainfrom
feat/external-control-mcp
Sep 5, 2026
Merged

Juliusolsson05 merged 15 commits into
mainfrom
feat/external-control-mcp

Conversation

@Juliusolsson05

@Juliusolsson05 Juliusolsson05 commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Agent Code's complex window, layout and agent UI makes reliable external operation difficult. This adds an opt-in control MCP that combines exact app operations with computer use, plus a live crash course, searchable command/shortcut catalogs and full invocation history.

Settings → Agents → External operator MCP manages the global Codex connection and agent-code-computer-execution skill. It is off by default. Enabling installs both for external clients using that Codex home; disabling stops the listener and removes owned setup. Port/key changes update the connection. Unrelated settings and edited/unmanaged files are preserved. Internal Agent Code launches, resume/recovery and workflow workers exclude the operator connection and skill.

The initial surface includes multi-window discovery/navigation, agent create/prompt/read, drafts, condition responses, guarded commands and the real picker, grid/Dispatch controls, editor opening, terminal create/read/input, and normal confirmed close with durable task status. Reads default to actual user prompts and visible assistant prose, with depth/range, pagination and deltas. Stable owners/generations and durable request keys prevent ambiguous routing and duplicate retries.

Feature owners register capabilities through an isolated internal SDK and reuse existing domain operations. The MCP transport cannot import app implementations. Loopback HTTP uses a private bearer; credentials are excluded from tool results and history. The operator skill is embedded in the application bundle, so packaged installs do not depend on the source checkout.

Validation:

  • Full TypeScript project build, test contract, command/keybinding audit and skill validation pass.
  • All changed-feature checks pass after updating the workflow launch expectation for the new skill exclusions; real Electron two-window routing/reload and authenticated HTTP MCP trials pass.
  • Full renderer suite: 114 files / 496 tests pass. Full local core suite: 2,130 tests pass; one unchanged provenance check fails because a historical developer-local source recording is absent. The test and its committed fixtures are identical to main; no test was weakened.
  • Real Codex 0.153.4 app-server discovery in a disposable home shows the operator skill enabled externally and disabled internally, preserving unrelated skill disables. Earlier disposable CLI probes verify MCP exclusion.
  • Production application build and required output verification pass.

Limits: external clients may need restart after setup/key changes; this uses one local Codex home, not a cloud ChatGPT deployment. Advanced provider lifecycle/rewind, bulk, settings/template and workflow tool families remain follow-up work in the plan. No signed DMG or full-app provider trial against the user's own state was performed. Concurrent external config writers have no shared filesystem CAS protocol; detected edits fail safely, with a small final check/rename race remaining.

Official documentation rechecked for the requested external/internal split:

  • Shared desktop/CLI/IDE MCP configuration: applies to clients on the same Codex host; existing clients may need restart; hosted ChatGPT web does not read local config.
  • Skill discovery and enable/disable: session-scoped exclusion was additionally confirmed against the actual installed CLI and its recorded skills/list results. The Codex-specific legacy skill root is intentionally used to avoid distributing this operator skill to other internal providers through the universal .agents/skills root.

Fixes #793

Define shared command discovery, acknowledged UI handoffs, and broad direct control for common or UI-difficult workflows. Prioritize finding and revealing existing agents across windows and layout modes while preserving provider and workspace behavior.
Make full command enumeration, effective and fixed keybinding coverage, and a whole-app feature guide explicit MCP requirements. Include UI-only features and live customization so discovery remains complete without requiring direct automation of every interaction.
Require retrievable durable MCP requests and outcomes, including full retained payloads and uncertain operations. Default agent reads to user prompts and all visible assistant messages, with independent detail depth, history ranges, and incremental pagination.
Keep feature registration independent of MCP and ordinary UI execution. Bind requests to an owner generation and reject ambiguous or stale routes. Enforce the boundary with a neutral compile and resolved import checks.

Refs #793
Keep workspace observation beside its owner and retire renderer generations at reload. Verify the real context-isolated Electron bridge in an isolated two-window trial without provider launches.

Refs #793
Keep feature guidance with its owners, enumerate real commands and effective bindings, and share description ranking with the picker. Paginated references reject stale continuation after customization.

Refs #793
Persist intent before dispatch and preserve unknown outcomes across restart. Keep filesystem storage outside the neutral SDK, with complete payload continuations and snapshot-bounded history reads.

Refs #793
Use feature-owned operations with stable entity targets, observed UI handoffs and provider delivery evidence. Route ownership in the private SDK executor, preserving normal UI operation without MCP registration.

Refs #793
Keep transcript storage and rendering ownership in feature-owned adapters. Freeze message pages, reject changed transcript boundaries, and keep status polling independent of history IO. Refs #793.
Generate tool schemas from feature contracts, preserve durable protocol records, and keep connection credentials in main-owned private settings. Exclude the reserved server from managed provider launches. Add the external computer-execution skill and verify routing with a real MCP client across two isolated Electron windows. Refs #793.
…ntrols

Keep command admission, composer persistence, condition dispatch, editor navigation and layout invariants with their existing owners. External adapters check observed revisions and backend generations before effects, and expose explicit window handoffs.

Refs #793
…tor controls

Install the global connection and Codex-only operator skill from app-wide Settings, preserve user ownership, and exclude both from internal launches and workflows. Add retained terminal reads/input and confirmed agent close with durable task results.

Refs #793
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.

feat(control): expose external MCP through an isolated capability SDK

1 participant