feat(codex): add Codex support for the CLI and the ChatGPT desktop app - #54
Open
luisiul359 wants to merge 3 commits into
Open
feat(codex): add Codex support for the CLI and the ChatGPT desktop app#54luisiul359 wants to merge 3 commits into
luisiul359 wants to merge 3 commits into
Conversation
Ships the OutSystems plugin for Codex, distributed through a repo marketplace at .agents/plugins/marketplace.json whose source.path resolves relative to the repo root. Codex is three surfaces over one ~/.codex/config.toml: the CLI, Codex in the ChatGPT desktop app, and the IDE extension. The first two take plugins, so installing from the CLI installs for the desktop app too. The IDE extension has no plugin support at all, so it gets a skill-as-a-file path instead - Codex discovers skills at .agents/skills/<name>/SKILL.md in repo, user, and admin scope, all verified on Codex CLI 0.148.0. Requires Codex 0.147.0 or newer. codex/skills/outsystems/SKILL.md is rebuilt from the current lockstepped base rather than forked, so its shared sections are byte-identical with cursor/skills/outsystems/SKILL.md; only First use / setup and Authenticating diverge, per the setup-flow exception. Plan gating goes the other way from Cursor here: Codex needs no paid plan, but a managed ChatGPT workspace can block the install four ways through requirements.toml, and all four fail silently.
`codex mcp login` run from inside a Codex session reports "Successfully logged in" and stores nothing. The OAuth flow is network plus a loopback callback so the browser sign-in genuinely succeeds, but persisting the token needs a write to ~/.codex/, which is outside the sandbox Codex applies to commands it runs. The write is denied with "Operation not permitted" and the command does not surface it. The user finds out a session later, as "requires OAuth reauthentication" and "MCP startup incomplete (failed: outsystems)". `codex mcp add` hits the same denial but fails loudly, with a non-zero exit and an explicit "failed to persist config" error, so it is not the trap. Every Codex recipe now hands the sign-in to the user to run in their own terminal, and verifies with the `Auth` column of `codex mcp list` rather than `Status` - `Status: enabled` only means the server is registered, while `Auth: Not logged in` means no token was stored. Reporting setup complete on `enabled` alone is what masked this.
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.
This PR is for adding Codex as a supported harness, for the CLI and for Codex in the ChatGPT desktop app (macOS), distributed as a plugin.
What was happening
Codex was listed under "other AI assistants (best effort)" in the README and had no install path, no skill doc, and no manifest. Users on Codex got no conventions at all — including the confirm-before-destructive rule.
What was done
New:
codex/plugin +.agents/plugins/marketplace.json. The repo doubles as a Codex marketplace;source.pathresolves relative to the marketplace root (the repo root), so the entry is./codex.Codex is three surfaces over one
~/.codex/config.toml— CLI, ChatGPT desktop app, IDE extension. The first two take plugins, so a CLI install is a desktop-app install too; there is no separate macOS-app setup. The IDE extension has no plugin support at all, so it gets a skill-as-a-file path instead. Codex discovers skills at.agents/skills/<name>/SKILL.mdin repo, user, and admin scope.Requires Codex 0.147.0 or newer (
codex pluginand skill frontmatter landed there), stated in every Codex-facing install doc.codex/skills/outsystems/SKILL.mdis rebuilt from the current lockstepped base, not forked — its shared sections are byte-identical withcursor/skills/outsystems/SKILL.md. Only## First use / setupand## Authenticatingdiverge, per the setup-flow exception.Plan gating runs the other way from Cursor. Codex needs no paid plan — CLI plugin browser,
codex plugin, andcodex mcpall work on Free, Go, Plus, Pro, and API-key sign-in. But a managed ChatGPT workspace (Business/Enterprise/Edu) can block the install four ways viarequirements.toml:marketplaces.restrict_to_allowed_sources,features.plugins, anmcp_serversallowlist matching name and URL, and workspace plugin controls. All four fail silently — the command reports success and nothing appears — so that's called out in the README,codex/README.md, the troubleshooting table, and the skill itself.Docs threaded through:
README.md(two install sections, three troubleshooting rows, reset + logs),CLAUDE.md(three harness rows, five traps, six-doc lockstep, five-manifest lockstep),CONTRIBUTING.md(structure, prerequisites, verification steps, versioning),.github/pull_request_template.md,cursor/README.md, rootSKILL.md.Test Steps
Verified on Codex CLI 0.148.0, not just read:
codex plugin marketplace add .→codex plugin listresolvesoutsystems@outsystemsto<repo>/codexfrom.agents/plugins/marketplace.json. (Codex would also accept.claude-plugin/marketplace.jsonas a legacy index; it takes the.agentsone here.)codex plugin add outsystems@outsystems→installed, enabled,0.17.0.codex execin a fresh session confirms the skill is offered, resolved from~/.codex/plugins/cache/outsystems/outsystems/0.17.0/skills/outsystems/SKILL.md.validate_plugin.py codexandquick_validate.py codex/skills/outsystems.codex/mcp.tomlparses as TOML withmcp_servers.outsystemspresent.$REPO_ROOT/.agents/skills/,~/.agents/skills/, and~/.codex/skills/all resolved.codex plugin remove,codex plugin marketplace remove).Lockstep grep, per
CLAUDE.md— a phrase from the lockstepped text and one from the setup clause:Harness table accounting (every row):
~/.codex/config.tomland the same marketplace/plugin state the CLI writes (confirmed present in that file), so the mechanism is verified even though the UI is not..agents/skillsprobe, extension UI not exercised.SKILL.mdgains one clause naming Codex CLI among browser-callback clients; the other four skill docs are untouched.Checklist
skills/outsystems/SKILL.md,kiro/outsystems/steering/skill.md,copilot/skill.md,cursor/skills/outsystems/SKILL.md,codex/skills/outsystems/SKILL.md, and rootSKILL.md— pluskiro/outsystems/POWER.mdwhere its## Conventionscarries the same rulesCLAUDE.md).claude-plugin/plugin.json,.claude-plugin/marketplace.json,cursor/.cursor-plugin/plugin.json,.cursor-plugin/marketplace.json,codex/.codex-plugin/plugin.json)Note for reviewers
An earlier draft of this work carried an
Authorization server issuer mismatchknown-gap section and anmcp-remotebridge fallback for Codex. That gap has since been fixed and validated server-side, so none of it is in this PR. Themcp-remotecontent still inREADME.mdis the unrelated Claude Desktop local-proxy fallback and is untouched.Two pre-existing items surfaced while working, deliberately left alone:
skills/outsystems/SKILL.mdphrases the callback-port exception as "One exception, at most once per session" where the other five say "One exception" — pre-existing drift in a host-specific Authenticating section.CLAUDE.mddocuments only the "lazy sign-in" drift. Happy to reconcile or record it in a follow-up.README.md's Claude Desktop fallback uses an unpinnedmcp-remote, which differs from the pin-the-version advice elsewhere.