fix(go): bump AgentField Go SDK past the codex --output-schema fix#111
Merged
Conversation
The pinned SDK (054a7d18, v0.1.113) predates agentfield#818, which makes
the codex harness provider survive OpenAI's strict schema validator:
gate inexpressible schemas off --output-schema and retry once without it
when the API rejects the schema with a 400. Without it, every codex role
invocation on a schema the validator refuses dies in seconds and
surfaces as a generic parse-failure fallback (e.g. "Product manager
failed to produce a valid PRD").
Bump the pseudo-version to agentfield main 20955b26 and keep the
Dockerfile / CI AGENTFIELD_SDK_REF mirrors in sync, per the go.mod
comment ("Bump both together").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The synthesizer system prompt names the actions in uppercase (FIX/APPROVE/BLOCK) while parseSynthesis compares against the lowercase enum constants, and the reflected request schema carries no enum to force the model's casing. Models therefore routinely answer "APPROVE" and every real synthesis was discarded for the deterministic fallback — which defaults to FIX whenever QA reports any failure, so coding loops could never accept work on machines with pre-existing environment-dependent test failures. Normalize the parsed action with TrimSpace+ToLower before the enum switch, and cover it with a regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Two fixes that together make SWE-AF actually able to run on the codex runtime on Windows. Found while debugging a swe-planner-go install whose every codex
builddied in seconds.1. Bump the pinned AgentField Go SDK past the codex
--output-schemafixThe pinned SDK (
054a7d18, v0.1.113, Jul 21) predates Agent-Field/agentfield#818 — "survive OpenAI's strict validator on codex --output-schema". Without it, any codex role invocation whose reflected output schema OpenAI's strict validator refuses dies immediately, surfacing only as the role's generic parse-failure fallback (observed live:Product manager failed to produce a valid PRD~6s into every build). Bumps the pseudo-version to agentfieldmain(20955b26) and keeps the twoAGENTFIELD_SDK_REFmirrors (go/Dockerfile ARG, CI go-job env) in sync, as the go.mod comment requires.2. Case-normalize the QA-synthesizer action before the enum check
The synthesizer system prompt names its actions in uppercase (FIX/APPROVE/BLOCK), the SDK's schema reflection drops the enum from
response_format, andparseSynthesiscompared the answer case-sensitively against the lowercase constants. Models therefore routinely answer"APPROVE"— and every real synthesis was silently discarded for the deterministic fallback, which defaults to FIX whenever QA reports any failure. On machines with pre-existing environment-dependent test failures this is an inescapable infinite coding loop: observed live as 30 coder/QA/review iterations across 4 issues with zero acceptances, on two different synthesizer models. Reproduced by replaying the exact call (real prompts +ai.WithSchema) standalone; fixed with TrimSpace+ToLower before the enum switch, plus a regression test.Validation
gofmtclean,go build,go vet,go test -race -count=1 ./...all green locally; CI green.plan→executerun (6-issue DAG on a real repo) completed 6/6 issues on the codex runtime, with the synthesizer returning real verdicts — the first successful SWE-AF-on-codex build on this machine.🤖 Generated with Claude Code