DO NOT MERGE YET: harden Codex structured output handling#86
Draft
PhilosophiMoonbeam wants to merge 1 commit into
Draft
Conversation
968bf10 to
2a308d2
Compare
2a308d2 to
fd7597f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Draft only. Do not merge without further live Codex/SWE-AF runtime testing.
Why
The upstream Codex fixes address auth/default model behavior, but AgentField SDK 0.1.96 still does not appear to drive Codex through native
--output-schema/--output-last-message. In SWE-AF runs this can still leave AgentField relying on the generic.agentfield_output.jsonwrite-tool contract, which is fragile for Codex and related to empty/null structured outputs.Changes
.agentfield_output.jsonpath.Permission-mode note
This draft intentionally preserves SWE-AF's existing Codex permission mapping.
permission_mode: "auto"still uses--dangerously-bypass-approvals-and-sandbox; explicitread-only,workspace-write, anddanger-full-accessvalues are still passed through; and unspecified/unknown values still fall back to--sandbox workspace-write.We briefly tried mapping
autotoworkspace-write, but live SWE-AF git initialization can fail because Codex cannot create.git/refs/...lockfiles inside that sandbox. This PR does not attempt to change permissions; safer sandboxing should be treated as separate future work requiring a git-management design that does not need Codex to mutate.gitmetadata.Local verification
AGENTFIELD_SERVER=http://localhost:9999 .venv/bin/python -m pytest tests/test_codex_harness_patch.py tests/test_ask_user.py tests/test_environment_scout.py -q-> 40 passedAGENTFIELD_SERVER=http://localhost:9999 .venv/bin/python -m ruff check swe_af/runtime/codex_harness_patch.py swe_af/hitl/ask_user.py tests/test_codex_harness_patch.py tests/test_ask_user.py tests/test_environment_scout.py-> passedAGENTFIELD_SERVER=http://localhost:9999 .venv/bin/python -m pytest tests/test_model_config.py tests/test_fatal_error.py tests/test_empty_build_guard.py tests/fast/test_app.py -q-> 123 passedswe_af/fastfiles.Still needed before merge
runtime: "codex".claude_codeoropen_codeproviders.