gsd2-provider-codex-cli adds a Codex CLI-backed provider plugin for GSD using @thereaperjay/gsd-provider-api.
- Registers provider
codex-reaperwith model IDs incodex-reaper:*namespace - Uses
codex exec --jsonfor request execution (CLI-authenticated runtime) - Translates Codex JSONL events into GSD provider events (
text_delta,tool_call_*,tool_result,completion,error) - Injects GSD tool registry into Codex per-run through a local Streamable HTTP MCP bridge (
mcp_servers.gsd_tools.url=...) - Runs onboarding/readiness checks via
codex --versionandcodex login status - Enforces soft/idle/hard timeout handling from supervisor config
- Applies context-write blocking checks to shell write commands and MCP tool arguments before execution
- Writes JSONL activity logs for assistant/tool events in
.gsd/activity
This provider treats Codex tool-like item events as tool activity:
item.started(command_execution) ->tool_call_start+tool_call_deltaitem.completed(command_execution) ->tool_call_end+tool_result- other non-message item types -> generic
tool_call_*+tool_result
Tool details are derived from the command string and surfaced to GSD status UI.
To keep tool output cleanly separated from assistant chat content, command/tool result payloads are not forwarded as text_delta.
On turn.completed, usage fields map as:
input_tokens->usage.inputTokensoutput_tokens->usage.outputTokenscached_input_tokens->usage.cacheReadTokens
If usage is unavailable, the provider emits completion with 0 token counts.
Onboarding and readiness checks require:
codexbinary available on PATHcodex login statusindicates logged in
If either check fails, GSD onboarding reports the corrective instruction.
This provider starts an in-process MCP server bound to 127.0.0.1 on an ephemeral port and injects it into Codex with per-run config overrides:
-c mcp_servers.gsd_tools.url="http://127.0.0.1:<port>/mcp"
The bridge merges:
- tools passed in
context.toolsfrom GSD - globally registered tools from
@thereaperjay/gsd-provider-apitool registry
index.ts- extension entrypoint wiringinfo.ts- provider metadata, auth checks, stream translation runtimeactivity-writer.ts- activity JSONL writer for Codex stream eventsmcp-http-tools.ts- local Streamable HTTP MCP bridge for GSD toolsextension-manifest.json- extension metadata for GSD