Migrating a production AI agent to GPT-5.6: 2.2x faster, 27% cheaper
TL;DR Highlight
Moving our agent to GPT-5.6 cut build time 2.2x and cost 27%
Who Should Read
A backend developer migrating a Claude-based agent to OpenAI models who is stuck on tool-call and prompt-caching differences
Core Mechanics
- A third of eval failures were harness bugs
- About a third of raw failures in the first run came from harness assumptions, not model behavior.
- Tool-call budgets were sized for Opus's sequential style, and GPT-5.6's parallel calls exceeded them.
- A dataset missing minScore inherited a default of 1.0, so a 0.98 hero counted as a failure.
- GPT-5.6 cut cost 27% per build
- Against Claude Opus 4.8 (n=11), GPT-5.6 (n=10) averaged $2.22 per completed build versus $3.06.
- Wall-clock time fell from 8m 00s to 3m 42s, output tokens from 33.0K to 17.1K, and visual score rose from 0.936 to 0.970.
- In one matched pair, globals.css went from 17,957 characters and 174 variables (Opus) to 2,508 and 45 (GPT-5.6).
- GPT-5.6 filled all 25 tool parameters
- The code tool has 25 top-level parameters with only action required, yet GPT-5.6 sent all 25 on 6,635 of 6,635 calls (100%).
- Opus 4.8 did so on 4 of 2,898 calls (0.1%) and claude-sonnet-5 on 0 of 1,933.
- Invented values like offset: 0 were treated as real arguments, so 52% to 64% of file reads came back empty.
- Schema fixed it, prompting did not
- An 'omit unused parameters' directive and per-property OPTIONAL hints both still produced 25 of 25.
- OpenAI strict mode behaved identically and would have required stripping pattern, format, and array-bound validation.
- Rewriting optional properties as required anyOf: [T, null] and stripping nulls before validation cut empty reads from 52% to 0% and tool calls by about 30%.
- Cache config was the whole cost gap
- Before the fix, GPT-5.6 looked about 50% more expensive than Opus.
- GPT-5.6 dropped partial-prefix matching, so a new conversation cached 0% of the 29K-token static prefix.
- A workspace-scoped prompt_cache_key with layered breakpoints raised first-call hits from about 0% to 83.7% and cut uncached input tokens 28%.
- Use store: false for reasoning replay
- The Responses API replays prior reasoning as server-side item references, causing intermittent Item 'rs_...' not found errors.
- Setting store: false makes the SDK request encrypted reasoning content and replay self-contained blobs.
Community Reactions
- Prompt, model, and harness are one system
- One commenter said failover services like OpenRouter are mostly useful only for sandbox testing.
- They argued production models aren't interchangeable and even system prompt delimiters should be tuned per model.
- Small workflow upgrades were a one-liner
- A commenter who moved small workflows from 5.4-nano and mini to 5.6 saw a similar range of improvement.
- They also saw gains in some classification tasks.
- Pushback on the schema workaround
- One commenter noted MCP has an explicit optional field, so a bug may sit between the TypeScript layer and the schema actually sent.
- They pointed out the actual request payload wasn't shown.
- Suggestion to use Luna instead of Sol
- A commenter suggested Luna for tool-heavy parts of the workload.
- They said five Luna runs cost one Sol run, making multi-sample runs attractive.
- Still on Opus 4.6, one team says
- Playcode.io said it stays on Opus 4.6 because it sees GPT-5.6 Sol as the same quality as 5.5.
- Others questioned switching within half a day of launch.
How to Apply
- Audit optional fields in tool schemas
- Today, count how often OpenAI models fill every optional argument in your production tool-call logs.
- Check whether defaults like offset: 0 change meaning and return empty results.
- If a tool returns success: true for empty results, add a field that distinguishes them.
- Convert OpenAI schemas to nullable
- At the provider boundary, make optional properties required and wrap their types in anyOf: [T, null].
- Strip null-valued keys at the shared invocation point just before the tool runs so tool code stays unchanged.
- Scope prompt_cache_key per workspace
- Avoid per-conversation keys because new conversations never hit the shared prefix.
- Avoid one global key because traffic over about 15 req/min spills to cold nodes.
- Split the static prefix and workspace context with breakpoints and keep prompts append-only.
- Fix your eval harness before comparing
- Read failure traces first to separate harness-caused failures from model failures.
- Raise tool-call budgets for parallel calls and support batched file reads.
- Set minScore explicitly on every dataset.
Try It
// Run in a terminal: Node/TS simplified version of the schema transform (optional -> required nullable)
// A simplified sketch of the article's idea that operates directly on JSON Schema objects
function toNullable(schema: any): any {
const required = new Set<string>(schema.required ?? []);
const props: Record<string, any> = {};
for (const [k, v] of Object.entries<any>(schema.properties ?? {})) {
props[k] = required.has(k) ? v : { anyOf: [v, { type: 'null' }] };
}
return { ...schema, properties: props, required: Object.keys(props) };
}
function stripNulls(args: Record<string, unknown>) {
return Object.fromEntries(Object.entries(args).filter(([, v]) => v !== null));
}
const schema = {
type: 'object',
properties: { action: { type: 'string' }, offset: { type: 'number' }, timeout: { type: 'number' } },
required: ['action'],
};
console.log(JSON.stringify(toNullable(schema), null, 2));
console.log(stripNulls({ action: 'read', offset: null, timeout: null }));Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques