Great work on the Codex CLI integration, thanks for putting this together!
After reviewing the PR against the actual Codex CLI docs and source code,
I found a few things that needed fixing. Here is what changed and why.
## request_user_input is a real Codex CLI tool
The adapter was removing `request_user_input` and replacing it with "ask
the user directly in chat". But `request_user_input` is a native Codex CLI
tool (like `shell` or `spawn_agent`). The fix: `AskUserQuestion` now maps
to `request_user_input` instead of being erased, and `request_user_input`
is preserved everywhere (adapter, docs, compat reference, tests).
## Fictional model names replaced with real ones
The config profiles used `gpt-5.4`, `gpt-5.4-mini`, and
`gpt-5.3-codex-spark`, which do not exist. Replaced with `o3` and
`o4-mini`, which are the current production models for Codex CLI.
## TOML key quoting (security)
`_cc_toml_quote_key` was sanitizing server names by replacing spaces with
hyphens (`Google Calendar` -> `Google-Calendar`). This broke cross-platform
parity because `mcp/servers.yaml` is the source of truth for all platforms.
The fix: the function now properly quotes keys per TOML spec when they
contain spaces or special characters, so `Google Calendar` stays as-is in
YAML and becomes `[mcp_servers."Google Calendar"]` in TOML output.
## servers.yaml breaking change reverted
The PR renamed `Google Calendar` to `Google-Calendar` in servers.yaml.
Since this file feeds all four platform adapters, that rename would break
Claude Code, Gemini CLI, and OpenCode builds. Reverted.
## TOML agent schema in migration doc was wrong
The example in codex-migration.md used a nested `[agent]` /
`[agent.prompt].content` structure. Codex CLI actually uses top-level keys:
`name`, `description`, `developer_instructions`. Fixed the example.
## Security hardening
- Path traversal guard on agent names: rejects `/` and `..` sequences
- Control character rejection in TOML key quoting (newline/CR/tab)
- Newline and tab escaping in all three TOML string escape functions
- Fixed glob expansion risk in `_cc_capabilities_to_sandbox` (now uses
`read -ra` array instead of unquoted word splitting)
## Docs and smoke matrix
- codex-cli.md: fixed tool mapping table, replaced `@Agent` syntax with
natural language prompts (Codex CLI does not support @ mentions), added
note about dispatcher routing
- codex-cli-compat.md: added Read/Glob/Grep/Bash tool mappings
- README.md: added codex-cli adapter and docs to the project structure tree
## Test updates
- ~15 tests updated to match the new semantics (request_user_input
preserved, model names, POSIX find instead of GNU -printf)
- 119/123 tests pass; the 4 remaining failures are pre-existing (bash 3.2
on macOS lacks `mapfile` and `declare -A`)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rebuilt from scratch following Codex CLI's actual architecture (as
outlined in the review on PR #26). Closes the integration gap with a
proper build adapter, correct install paths, TOML agent files, and
all the architectural differences documented and tested.
What changed vs the previous attempt (PR #26):
- Agents: build adapter generates .toml files (name/description/
developer_instructions) into dist/codex-cli/.codex/agents/ instead
of copying .md files with sed transforms
- Skills: installed to .agents/skills/ (correct Codex discovery path)
instead of .codex/skills/
- Dispatcher: AGENTS.md uses a root-context orchestration header that
works within agents.max_depth=1 constraints; named-agent routing
replaced with embedded-instructions workaround for the known
spawn_agents limitation (openai/codex#15250)
- Tool compat: AskUserQuestion and request_user_input removed; all
prompts adapted to Codex's actual tool set and approval/confirmation
flow
- Installer/updater: launchme.sh --platform codex-cli and updateme.sh
with Codex auto-detection, creating the correct split layout
(AGENTS.md + .codex/agents/ + .codex/config.toml + .agents/skills/)
- Tests: new per-adapter test suite (tests/adapters/codex-cli/),
install/update smoke (tests/scripts/codex-cli-install.test.sh), and
a four-platform parity gate that proves Codex changes do not regress
Claude Code, Gemini CLI, or OpenCode
- Docs: new codex-cli.md guide, codex-migration.md for users switching
from other platforms, and README/getting-started/examples updated for
four-platform positioning
- Bash harness: .gitattributes added to enforce LF on .sh files;
harness LF-normalized so tests/run.sh works on Windows checkouts
- .gitignore: .planning/ added (internal GSD workflow artifacts)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>