Skip to content

fix(go): bump AgentField Go SDK past the codex --output-schema fix#111

Merged
AbirAbbas merged 2 commits into
mainfrom
fix/bump-sdk-go-codex-output-schema
Jul 23, 2026
Merged

fix(go): bump AgentField Go SDK past the codex --output-schema fix#111
AbirAbbas merged 2 commits into
mainfrom
fix/bump-sdk-go-codex-output-schema

Conversation

@AbirAbbas

@AbirAbbas AbirAbbas commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

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 build died in seconds.

1. Bump the pinned AgentField Go SDK past the codex --output-schema fix

The 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 agentfield main (20955b26) and keeps the two AGENTFIELD_SDK_REF mirrors (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, and parseSynthesis compared 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

  • gofmt clean, go build, go vet, go test -race -count=1 ./... all green locally; CI green.
  • Live end-to-end on Windows after reinstalling from this branch: a full planexecute run (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

AbirAbbas and others added 2 commits July 23, 2026 09:55
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>
@AbirAbbas
AbirAbbas merged commit 0235d11 into main Jul 23, 2026
3 checks passed
@AbirAbbas
AbirAbbas deleted the fix/bump-sdk-go-codex-output-schema branch July 23, 2026 18:37
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.

1 participant