Skip to content

DO NOT MERGE YET: harden Codex structured-output routing#86

Closed
PhilosophiMoonbeam wants to merge 4 commits into
Agent-Field:mainfrom
PhilosophiMoonbeam:codex-native-structured-output-hardening
Closed

DO NOT MERGE YET: harden Codex structured-output routing#86
PhilosophiMoonbeam wants to merge 4 commits into
Agent-Field:mainfrom
PhilosophiMoonbeam:codex-native-structured-output-hardening

Conversation

@PhilosophiMoonbeam

@PhilosophiMoonbeam PhilosophiMoonbeam commented Jun 29, 2026

Copy link
Copy Markdown

Status

Draft. Do not merge without a fresh end-to-end Codex build and non-Codex smoke.

Summary

  • Use Codex native structured output with --output-schema and --output-last-message.
  • Use per-call schema/output temp dirs to avoid concurrent same-repo collisions.
  • Sanitize schemas for strict Codex structured output.
  • Route QA synthesizer through provider-aware router.harness() so bare Codex model names work.
  • Use an explicit HITL choice model instead of a free-form dict schema.
  • Preserve configured permission_mode through DAG git operations: setup, merge, integration test, cleanup.
  • Default Codex to --dangerously-bypass-approvals-and-sandbox when permission mode is omitted, empty, auto, default, danger-full-access, or bypassPermissions; explicit read-only and workspace-write still pass through.

Why

  • Codex does not use AgentField's file-write path for .agentfield_output.json.
  • Shared output files collide during concurrent same-repo calls.
  • Strict structured output rejects defaults and free-form object maps.
  • Dropped permission mode made Codex fall back to workspace-write, which blocked git metadata writes in SWE-AF merge/setup paths.

Verification

  • AGENTFIELD_SERVER=http://localhost:9999 .venv/bin/python -m pytest -q -> 1025 passed, 1 skipped
  • AGENTFIELD_SERVER=http://localhost:9999 .venv/bin/python -m pytest tests/test_coding_loop_regressions.py tests/test_codex_harness_patch.py tests/test_model_config.py -q -> 61 passed
  • AGENTFIELD_SERVER=http://localhost:9999 .venv/bin/ruff check swe_af/reasoners/execution_agents.py swe_af/runtime/codex_harness_patch.py swe_af/execution/dag_executor.py tests/test_coding_loop_regressions.py tests/test_codex_harness_patch.py -> passed
  • git diff --check origin/main..HEAD -> passed

Still Needed

  • One clean end-to-end SWE-AF build with runtime: "codex" on a disposable repo.
  • Smoke claude_code and open_code paths.

@CLAassistant

CLAassistant commented Jun 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@PhilosophiMoonbeam PhilosophiMoonbeam force-pushed the codex-native-structured-output-hardening branch 5 times, most recently from 81e46f0 to e423783 Compare June 30, 2026 19:02
@PhilosophiMoonbeam PhilosophiMoonbeam force-pushed the codex-native-structured-output-hardening branch from e423783 to ad0f957 Compare June 30, 2026 23:33
@PhilosophiMoonbeam PhilosophiMoonbeam changed the title DO NOT MERGE YET: harden Codex structured output handling DO NOT MERGE YET: harden SWE-AF Codex structured-output routing Jun 30, 2026
@PhilosophiMoonbeam PhilosophiMoonbeam changed the title DO NOT MERGE YET: harden SWE-AF Codex structured-output routing DO NOT MERGE YET: harden Codex structured-output routing Jun 30, 2026
@PhilosophiMoonbeam PhilosophiMoonbeam changed the title DO NOT MERGE YET: harden Codex structured-output routing DO NOT MERGE YET: harden Codex routing and resume recovery Jul 2, 2026
@PhilosophiMoonbeam PhilosophiMoonbeam changed the title DO NOT MERGE YET: harden Codex routing and resume recovery DO NOT MERGE YET: harden Codex structured-output routing Jul 2, 2026
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