Skip to content

fix(codex): support exec optimizer backend#1

Draft
TheGameVIX wants to merge 2 commits into
SparshGarg999:fix/46-windows-support-codexfrom
TheGameVIX:agent/codex-exec-optimizer
Draft

fix(codex): support exec optimizer backend#1
TheGameVIX wants to merge 2 commits into
SparshGarg999:fix/46-windows-support-codexfrom
TheGameVIX:agent/codex-exec-optimizer

Conversation

@TheGameVIX

Copy link
Copy Markdown

Summary

  • allow codex_exec as an optimizer backend and make --backend codex route both optimizer and target through Codex exec
  • route optimizer calls through skillopt.model.codex_backend, including token tracking and Codex exec config
  • send SkillOpt-Sleep Codex prompts through stdin (codex exec -- -) so multiline replay prompts work reliably on Windows
  • update backend docs/config references and add regression tests

Why

This is a stacked follow-up for microsoft#101. That PR adds Windows/Codex plugin support, but the normal SkillOpt train/eval path still left the optimizer on openai_chat when users selected --backend codex. That meant users could still hit API-backed optimizer calls instead of Codex exec.

During Windows smoke testing, skillopt_sleep --backend codex also exposed a Codex CLI prompt transport issue: multiline prompts passed as argv could produce bad replay responses. Passing the prompt through stdin keeps the same codex exec backend while avoiding Windows argv parsing edge cases.

Validation

  • python -m pytest -q (170 passed, 5 skipped)
  • python -m mkdocs build --strict
  • python -c "import sys; sys.argv=['train.py','--config','configs/searchqa/default.yaml','--backend','codex']; from scripts.train import parse_args, load_config; cfg=load_config(parse_args()); print(cfg['optimizer_backend'], cfg['target_backend'])" prints codex_exec codex_exec
  • Windows Codex smoke: python -m skillopt_sleep dry-run --project "D:\Documents\AI\manhwa_recap_local_ui\manhwa_recap_local_ui" --backend codex --tasks-file "<reviewed smoke tasks>" --progress --json exited 0 with reviewed tasks and no adopt

@SparshGarg999 SparshGarg999 force-pushed the fix/46-windows-support-codex branch from c7a1604 to 79d6117 Compare July 13, 2026 15:50
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.

2 participants