Skip to content

v2.20.0 — Codex App Server JSON-RPC integration (cmd_357)

Latest

Choose a tag to compare

@yohey-w yohey-w released this 18 May 20:11
· 288 commits to main since this release

Overview

v2.20.0 introduces a Codex App Server JSON-RPC backend for CoDD's AI calls. When codex_app_server.enabled: true is set in codd.yaml, codd implement, codd verify --auto-repair, and codd fix [PHENOMENON] route their AI invocations through a persistent JSON-RPC thread (Initialize → ThreadStart → TurnStart) instead of spawning a fresh subprocess per call — amortising codex cold-start across an entire codd command. Subprocess remains the default and CoDD falls back automatically when the binary or socket is missing.

Added

  • codd/deployment/providers/codex_app_server.py — stdio / unix-socket / websocket transport client + Initialize→ThreadStart→TurnStart orchestration with TurnFailed/Timeout detection
  • codd/deployment/providers/ai_command_factory.pyget_ai_command() evaluates the codex_app_server section in codd.yaml and returns either the new backend or the subprocess one, with automatic fallback
  • codd/deployment/providers/ai_command.pyAiCommand Protocol (invoke + close) + CodexAppServerAiCommand implementation; existing SubprocessAiCommand kept fully backward-compatible
  • codd implement-step / codd verify --auto-repair / codd fix [PHENOMENON] integrated via the factory (impl_step_deriver / llm_repair_engine / phenomenon_fixer)
  • codd.yaml codex_app_server section (opt-in, default enabled: false) with fields:
    • transport / url / command / thread_strategy (per_cmd | per_session) / effort / model / timeout_seconds / fallback (subprocess | error | silent)
  • codd/templates/codd.yaml.tmpl ships a commented opt-in example
  • 12 new tests: factory 6, client 2, repair engine 4, phenomenon fixer 4

Configuration example

codex_app_server:
  enabled: true
  transport: stdio
  command: codex app-server
  thread_strategy: per_session
  effort: medium
  model: gpt-5.4-codex
  timeout_seconds: 1800
  fallback: subprocess

thread_strategy: per_session reuses one thread for every turn in a codd implement / codd verify --auto-repair / codd fix invocation, eliminating per-call codex startup overhead.

Compatibility

  • Default (enabled: false) and any codd.yaml without a codex_app_server section behave exactly as v2.19.0.
  • When the codex binary is missing, the unix socket is unreachable, or thread.start fails, CoDD logs a WARNING and silently re-runs the call via SubprocessAiCommand. No CI break, no behaviour change for upstream users.
  • The phenomenon-fixer special case (project_root=None + Claude --print) is preserved across the factory boundary through command_override.

No breaking changes

This release introduces a new opt-in backend. There is no migration burden for existing CoDD users — pip install -U codd-dev is sufficient and the default path remains subprocess.

Quality

  • pytest: 3013 PASSED / 0 failed / 0 skipped
  • Dogfooded on a CoDD-initialized project: codd verify --runtime --runtime-skip verification-test → EXIT=0
  • Fallback path manually verified (codex binary absent → WARNING logged → SubprocessAiCommand used)

Acknowledgments

CoDD is shaped by:

Links


日本語補足

v2.20.0 は Codex App Server JSON-RPC バックエンド を opt-in で追加するリリース。codd.yamlcodex_app_server.enabled: true を書くと codd implement / codd verify --auto-repair / codd fix [PHENOMENON] の AI 呼び出しが永続 JSON-RPC スレッド経由になり、thread_strategy: per_session で codex のコールドスタートを 1 コマンド全体で償却できる。default は subprocess のままで完全後方互換、codex バイナリ・ソケット欠落時は自動 subprocess フォールバック。pytest 3013 PASSED / 0 SKIP。breaking change なし、pip install -U codd-dev のみで移行可。