Skip to content
AI Primer
workflow

Engineers replace broad agent loops with scoped workflows and SWE-bench harnesses

Practitioner threads favored narrow tasks, deterministic steps, task-specific harnesses and explicit acceptance criteria over open-ended agent loops. One Codex workflow reported 58.6%-87.0% token cuts on SWE-bench task sets.

7 min read
Engineers replace broad agent loops with scoped workflows and SWE-bench harnesses
Engineers replace broad agent loops with scoped workflows and SWE-bench harnesses

TL;DR

  • Agent builders pushed back on open-ended loops because each stochastic substep adds another failure surface, a point badlogicgames framed as compounding error rather than graph syntax.
  • The replacement pattern was a scoped software factory: one six-stage factory post split work into scaffolding, brainstorming, planning, implementation, review, and CI.
  • Cost control moved down the stack: Jerry Liu's harness post favored task-specific harnesses, while the SIE thread argued that small model pipelines still waste money if each model owns a separate server.
  • One r/OpenAICodex workflow reported 58.6% to 87.0% token cuts and 45.8% to 71.9% cost cuts across SWE-bench task sets by using Codex as manager and cheaper agents as workers, according to the SWE-bench token-cut report.
  • The tooling trend was toward durable graphs, leases, evidence, and explicit verification: Planr's launch post described a local-first task graph, while the ProofAgent-Harness paper post scored context quality before behavior.

The Claude Code dynamic workflows docs define the new high-end loop as a rerunnable JavaScript script that orchestrates subagents. The Squid README is more industrial: five agent roles, two human gates, reviewed PR at the end. Planr makes the graph local and evidence-backed. SIE attacks the other half of the factory problem: 100+ small models behind one server, with batching, GPU sharing, and model switching.

Compounding error

The sharpest critique was probabilistic math, not taste. If an agentic pipeline has four or five stochastic substeps and each one is less than perfectly reliable, the system inherits the product of those failure rates.

badlogicgames clarified that graphs are useful, but most of the work is guardrailing compounding errors. In a later reply, he pointed at subtle reasoning drift and plausible-but-wrong code as error classes that observability and replay do not automatically catch in a verification reply.

Tim Dettmers reported the same failure mode from the user side: months of loop experiments still drifted even with good specs, while overnight single-agent sessions worked better for him Dettmers on loop drift. A small counterexample came from realmcore_, who said a bounded loop of run agent -> review -> run -> review worked when it ended with human code review.

Software factory stages

One concrete factory blueprint split agentic coding into six stations:

  1. Scaffolding
  2. Brainstorming
  3. Planning
  4. Implementation
  5. Review
  6. CI

The important move is that implementation is only one station. In Squid's README, the same idea becomes a Claude Code plugin with a PA, SWE, Tester, PR Reviewer, and On-Call pipeline, plus exactly two human gates: plan approval and final merge.

The human review boundary also narrowed. dzhng argued that humans should review every decision, not every line, because AI is a strong execution machine and still a weak decision-maker.

Deterministic steps

The most useful recipe was brutally simple:

  1. Start with full inference for every step.
  2. Observe behavior.
  3. Judge correctness.
  4. Replace inference steps with deterministic steps where possible.

That turns an agent system into normal software wherever the problem allows it. badlogicgames's follow-up put the economic version plainly: agents can help automate themselves away.

The same pattern showed up outside coding. Corey Ganim's process post split business automation into audit, optimize, then automate, with file naming, folder structure, process rules, review checklists, gates, owners, and access rules cleaned up before adding AI.

Task-specific harnesses

Jerry Liu's useful distinction was between general harnesses and task-specific harnesses. The latter can encode domain priors, model mixtures, and UX for accuracy, cost, and latency constraints.

A smaller argument followed: do the thing directly when the plan is the wrong artifact. lopopolo argued that producing the result gives more signal about underspecification than having agents debate the plan, and a follow-up called accepted-but-failing plans an extra confounder in the failure trajectory.

The tool layer is also getting more specific. LlamaParse's retrieval post listed hybrid search, file grep, file find, and file read endpoints for document retrieval, while thdxr's MCP warning complained about MCP servers wrapping their own code mode when the agent already has one.

Durable task graphs

Planr's pitch is a local-first graph shared by Codex, Claude Code, Cursor, MCP clients, and humans. Its public docs describe three layers: Markdown plans, a live dependency map, and agent loops.

The mechanics are boring in the best way:

  • readiness is computed from blockers,
  • agents claim one ready item atomically,
  • closure requires logs, files, tests, or review evidence,
  • state survives sessions through a SQLite-backed graph.

The adjacent Agent Mail and beads stack went further into multi-agent coordination. doodlestein's Agent Mail note described mail for file access coordination, unexpected issue triage, temporary pauses, and advisory reservations after the plan and beads are already refined.

SWE-bench token cuts

r/OpenAICodex

Combining Codex 5.6 with local agents for 80%+ token reduction!

0 comments

One r/OpenAICodex post claimed that a manager-worker setup kept quality close to Codex 5.6 Sol High while cutting tokens and cost across three task sets:

  • SWE-bench Lite, 50 tasks: 464,252 -> 192,406 manager tokens, $0.9894 -> $0.5368, 58.6% token cut and 45.8% cost cut.
  • SWE-bench Lite reddit10, 10 tasks: 105,254 -> 26,191 tokens, $0.1541 -> $0.0498, 75.1% token cut and 67.7% cost cut.
  • SWE-bench Verified multi-file, 12 tasks: 335,366 -> 43,724 tokens, $0.8229 -> $0.2309, 87.0% token cut and 71.9% cost cut.

The author said the orchestration was not the secret sauce. Memory was: agents needed inter-turn communication so work was done once instead of rediscovered by every worker.

SWE-bench remains the reference family here because it asks agents to patch real GitHub issues in real repositories, and SWE-bench Verified is the human-filtered 500-instance subset.

Shared inference

Small specialized models do not make a production pipeline cheap if every model still gets its own server. the SIE thread described the common stack as vLLM for the LLM, TEI for the embedder, and custom FastAPI wrappers for the rest, with each process reserving GPU memory whether traffic arrives or not.

SIE's official docs say the engine serves encoders, rerankers, and extractors from one infrastructure layer with batching, GPU sharing, and automatic model switching across 100+ models. The practical API shape in the thread was four calls:

  • encode() for vectors
  • score() for relevance
  • extract() for spans
  • generate() for small open LLMs

The non-obvious cost claim was serving-side: if four small models can rotate through one GPU instead of sitting in four siloed fleets, the model mix can get cheaper without changing the work.

Harness evals

The eval work followed the same decomposition. The ProofAgent-Harness paper scores context across seven criteria:

  1. Role clarity
  2. Guardrail coverage
  3. Instruction consistency
  4. Tool schema quality
  5. Grounding sufficiency
  6. Injection hardening
  7. Token efficiency

The paper's claim is narrower than generic agent eval hype: context quality predicted matching behavioral outcomes while holding the model fixed.

MemoHarness decomposes harness improvement into six editable surfaces: context, tool use, generation, orchestration, memory, and output. The abstract reports 0.806 on a shell-agent benchmark versus 0.722 for the strongest fixed-harness baseline, using retrieved past execution experience without test-time labels or gradient updates.

Framework builders were saying the same thing in production language. zeeg argued that agent frameworks should ship end-to-end testing with LLM judge assertions plus local and production telemetry, including traces and unhandled errors.

Explicit invocation

Claude Code's 2.1.215 changelog moved in the same direction: less unsolicited automation. the changelog excerpt says /verify and /code-review no longer run automatically and must be invoked explicitly.

The same release also designated grep as the search path for search tasks, added claude-code-guideG, removed claude-code-guide, and increased prompt tokens by 6,001 according to ClaudeCodeLog's diff post. That is a small but telling factory setting: checks became opt-in, search became more deterministic, and the harness got more explicit about its own tool behavior.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 7 threads
TL;DR1 post
Compounding error3 posts
Deterministic steps1 post
Task-specific harnesses4 posts
Durable task graphs3 posts
Harness evals1 post
Explicit invocation1 post
Share on X