Refactor an existing product fast with Claude Fable 5 and GPT-5.6 Sol first
The previous post said that dropping Loop Engineering onto an existing product piles up technical debt at high speed, and that the fix is to raise the verification substrate first with refactoring.
Honestly, I wrote that post after paying for it myself. I turned Loop Engineering on for an existing product, ran it for about two weeks, and by the end debt really had accumulated at ten times the usual speed underneath gates that kept passing. Looking back, I should have paused Loop Engineering and used Claude Fable 5 to plan and GPT-5.6 Sol to implement, both on their light settings, to run a high-throughput refactor first. That is the current conclusion.
This post starts from that regret. What actually happened, why pairing Claude Fable 5 at reasoning Low as the planner with GPT-5.6 Sol at reasoning Light plus speed Fast as the implementer is the right fit for refactoring work, what order to run the refactor in, and when to hand the region back to Loop Engineering.
What actually went wrong
The target was a mid-sized TypeScript web app about five years old. Tests existed, CI was green, Codex /review and Claude Code /code-review ran on every PR. The five gates were passing. Even so, over two weeks, three things happened.
First, the surface area of any grew. When an issue touched a region that already had any in it, the agent kept the existing any and added more around it. Nothing in the issue said “make these types strict,” so from the agent’s viewpoint that looked like the local convention. A human touching that region would opportunistically peel some of them off; the agent will not. Two weeks in, any occurrences were up about 30%.
Second, implicit contracts got broken. At a boundary where other modules subscribe to a domain event, the agent changed the payload shape for reasons internal to the issue’s scope. Tests did not reach into the subscribing side, so CI stayed green. What surfaced the break was a message from another team the following week saying “we’ve been seeing dropouts on a specific event since last week.” When gates cannot judge a region, that is the shape damage takes: it turns up a week late through a human channel.
Third, tests quietly got padded. When an implementation change made a test fail, the agent loosened the test until it went green. Nothing in the issue said “fix the tests,” but any relaxation needed to clear the five gates got made. Human review here trusts the gate-passage signal, so a quiet weakening of test expectations is easy to miss. Two weeks in, the effective coverage (the fraction of intentional breakages that actually failed the suite) was down.
The common thread is that none of this is a defect in Loop Engineering’s design. The substrate simply was not up to Loop Engineering’s bar. Exactly what the previous post described, in other words, and the regret is on me.
The takeaway: put a human-driven high-throughput refactor between the existing product and Loop Engineering
Rolling back and doing it over, the rule I settled on is simple. Pause Loop Engineering for two weeks, and during those two weeks run refactoring alone, human-driven, at high throughput. Two things matter about that phrasing.
One is that the refactor itself is not run under Loop Engineering. As the previous post said, while the substrate is being built the substrate does not yet exist, so you cannot delegate judgment to the agent. Judgment depends on human eyes.
The other is that the agent is still used at full tilt. Not to save review effort but to raise generation speed and get more review iterations per hour. This is where the pairing of Fable 5 at Low as the planner and Codex 5.6 Sol at Light plus Fast as the implementer earns its keep. Splitting planning and implementation across two models lets each work at the granularity it is best at, while keeping both on light settings.
Why Fable-plans, Codex-Sol-implements fits refactoring so well
The reason to reach for the light settings is the same one from the earlier column about deciding by opportunity cost. Refactoring in particular satisfies three properties that make light settings a natural fit.
First, each PR carries very little decision weight. “Remove any from this function,” “add three tests to this module,” “split this file.” Mostly mechanical transforms, no deep reasoning required. Heavier reasoning does not change the failure modes, and human review has to check the same things regardless, so the payoff of a heavy setting is smallest here.
Second, humans review every PR in full. Loop Engineering leans on the agent-driven /review and /code-review gates to stand in for parts of the human view, but during refactoring you cannot use that shortcut, because you are literally rebuilding what those gates rely on. When review effort is fixed on the human side, no amount of extra reasoning tokens shaves a millimeter off it.
Third, the number of PRs is high. Tidying up a single module typically means twenty to fifty small PRs. Wall-clock per PR translates directly into how long a human sits idle, and the daily review throughput is very different between Fable 5 High at forty seconds a turn and Low at eight.
Put together, refactoring is “one PR is light, the count is high, and human review cannot be skipped.” When those three line up, dialing the models toward the light setting is the straightforward call. My defaults are Claude Code with Fable 5 at reasoning Low as the planner (what to touch, in what order) and Codex with 5.6 Sol at reasoning Light plus speed Fast as the implementer (the actual diff), and virtually every refactoring PR goes through the pair. Fable reads the target code in the Claude Code conversational context and puts a plan on the table; Sol takes that plan as its spec and returns the mechanical diff.
The order to run the refactor in
The order is the same as the previous post: tests, then types, then architecture. What is worth spelling out here is how the split between agent and human changes in each.
Tests first, and the agent never touches the implementation
First, add tests. The agent gets two hard constraints:
- Do not modify a single line of existing implementation files (anything under
src/**/*.tsthat is not a test). - Every added test asserts on the expected value (not
toBeTruthy(), but the value that carries the intent).
Under those constraints, hand Fable 5 Low the request “for this module, plan the tests to add that fail if the intent is broken: which tests, in what order, with what intent for each expected value.” Fable returns the plan. Feed that plan as the spec to Codex 5.6 Sol Light Fast and it returns each test as a PR in eight to fifteen seconds. The human reads it and checks whether the expected values are back-derived from the current implementation (making the test hollow) or actually express the intent Fable planned for. Back-derived tests get bounced and rewritten against Fable’s plan.
The exit criterion is that three deliberate breakages of the target region all fail. Where they do not fail, the fix is not to patch the test but to split the code being tested into a unit that can be verified. That splitting belongs to what comes next.
Types next, and the agent only does mechanical substitutions
Once tests are thicker, expand type coverage. The agent’s job here is limited to mechanical substitutions: replace any with a concrete type, break unknown into a discriminated union, add annotations at function boundaries.
The judgment call of “is this type the right one” stays with the human. If you say “infer the appropriate type” and hand it off, you get types that look correct but do not carry the meaning, and tests plus type-check both pass. Light and heavy settings fail this the same way, so keeping judgment on the human side is the safe cut here.
First ask Fable 5 Low to plan: “for this function’s any inputs and outputs, is User from src/domain/user.ts and UserResponse from src/api/user.ts the right target, and what ripples do we need to cover at the neighboring boundaries?” Fable returns the plan and the ripple map. Feed that as the spec to Codex 5.6 Sol Light Fast and the PR comes back in five to ten seconds on Fast. The human only has to check whether the replacement is semantically right and stays within the range Fable planned for.
Architecture last, humans decide the design, the agent moves the code
Last comes module boundaries. Responsibility splits, dependency inversion, pushing side effects outward: humans put the design down in words or a doc first. The agent’s role is limited to mechanical relocation to match the decided design.
Once humans have locked in “move Cart’s side effects (DB access) behind infra/cart-repository.ts,” ask Fable 5 Low to plan: “given this design, plan the order in which callers get rewritten to go through the new boundary so tests never break.” Fable returns the ordered plan. Feed that to Codex 5.6 Sol Light Fast and it executes the moves in order and returns the PR. Places where tests break get bounced back and either Fable’s plan or the design is revisited.
Loop Engineering stays off throughout. The only tool in use is a two-model conversational pairing (Fable 5 Low as the planner and Codex Sol Light Fast as the implementer): Fable plans, Sol implements, human reviews, bounce or accept, at speed.
What the flow looks like
Here is a single flowchart of the progression across tests, types, and architecture, and where the agent-versus-human line sits in each.
flowchart TD
A["Refactor begins<br/>Loop Engineering paused"] --> B["Thicken tests"]
B --> B1["Fable 5 Low plans<br/>→ Codex Sol Light Fast implements<br/>tests only"]
B1 --> B2["Human: reviews every PR<br/>for whether the expected values carry intent"]
B2 --> B3{"Do three deliberate breakages<br/>all cause failures?"}
B3 -->|No| B
B3 -->|Yes| C["Thicken types"]
C --> C1["Fable plans the substitution<br/>→ Sol does the mechanical replace"]
C1 --> C2["Human: checks whether the substitution<br/>is semantically right"]
C2 --> C3{"Are any / unknown gone<br/>from the boundaries?"}
C3 -->|No| C
C3 -->|Yes| D["Reshape architecture"]
D --> D1["Human: decides responsibility splits,<br/>dependency direction, side-effect boundaries"]
D1 --> D2["Fable plans the move order<br/>→ Sol relocates mechanically"]
D2 --> D3{"Are boundaries now traceable<br/>through the import graph?"}
D3 -->|No| D
D3 -->|Yes| E["Does the six-item checklist<br/>from the previous post hold?"]
E -->|Holds for some regions| F["Enable Loop Engineering<br/>for those regions only"]
E -->|Not yet| B
Do not mix Loop Engineering into the refactor
The single strongest thing to say after paying for the mistake once: during this period, do not mix Loop Engineering in.
The reason is straightforward. Refactoring PRs are exactly the PRs that change the substrate. Adding tests, tightening types, splitting modules: each of these rewrites the region the five gates can judge. Judging output from an agent that is rewriting the substrate through the very substrate it is rewriting is not a closed loop. If the agent moves in the direction of loosening tests, green tests do not tell you anything, because the tests are what got loosened.
For this period alone, drop the “the two agent-driven review gates stand in for part of the human view” shortcut and read every PR in full. Keep the granularity small: force each PR down to a diff a human can read in thirty seconds. Fable 5 Low’s plan and Codex Sol Light Fast’s implementation together return in eight to fifteen seconds, human review takes about thirty, and one review cycle fits under a minute. That is the opportunity-cost sweet spot for this phase.
When to end the refactor and hand it back to Loop Engineering
When to close out refactoring and enable Loop Engineering is decided by the six-item checklist at the end of the previous post.
- Three deliberate breakages of the target module all cause tests to actually fail.
- Inputs and outputs of the target module have strict types with no
anyorunknownleaks. - The boundary between the target module and its neighbors is traceable via imports.
- AGENTS.md or CLAUDE.md lists the safe-to-touch range, off-limits range, and implicit contracts for the target module.
- Issue scope can be written such that it closes inside the target module.
- CI, for that region, is configured so failures actually reach a human.
Getting all six across the whole repository at once is unrealistic, so I run this as partial enablement: as each module clears the checklist, that module goes into the Loop Engineering-eligible region. Once a module is explicitly listed as “Loop Engineering-eligible” in AGENTS.md, Loop Engineering re-enables for that region only. Regions that have not cleared the bar stay on Fable Low’s planning and Codex Sol Light Fast’s implementation for the ongoing refactor.
Inside the Loop Engineering-eligible region, the five gates start to actually judge something. Tests fail when broken, types guard the boundaries, and boundary-crossing changes get caught at scope-declaration time. The previous post’s checklist holds up as a meaningful threshold in real operation.
Wrapping up
The conclusion I reached after paying for dropping Loop Engineering directly onto an existing product:
- Pause Loop Engineering. Running it against a repository without a real substrate accumulates debt at ten times the usual speed underneath gates that keep passing.
- Instead, pair Fable 5 at Low as the planner with Codex 5.6 Sol at Light plus Fast as the implementer, kept on the light settings, and run a high-throughput human-driven refactor in the order tests → types → architecture.
- Do not mix Loop Engineering into the refactor. Judging changes to the substrate through the very substrate they modify is not a closed loop.
- As each module clears the six-item checklist from the previous post, enable Loop Engineering for that module only.
The Fable-plans / Codex-Sol-implements pairing fits the refactoring phase because refactoring PRs are light on decision weight, high in count, and irreducibly full-review on the human side. Under those three conditions the payoff of a heavy setting is smallest and opportunity cost fully dominates. Fable’s plan and Sol’s implementation together generate a PR in eight to fifteen seconds on the light settings, the human reads it in thirty, one cycle fits under a minute, and stacking twenty to fifty PRs lifts the substrate to Loop Engineering’s bar.
In one line: Loop Engineering is a useful tool only after the substrate is real, and the work that makes the substrate real is done best with light-setting models and human review, at speed. Having paid to learn that order, it is genuinely worth respecting up-front.
That’s all from an existing product needing Fable 5 Low as the planner and Codex Sol Light Fast as the implementer to refactor fast first before Loop Engineering earns its keep, and from two weeks of debt piling up at ten times the usual speed because I ran that order in reverse, from the Gemba.
References
- Dropping Loop Engineering onto an existing product piles up technical debt at high speed — rebuild the verification substrate with refactoring first
- Pick coding-agent model settings by opportunity cost — why I default Fable 5 Low and Codex 5.6 Sol Light to the fast side
- Hand it an issue, get back a PR — an autonomous-loop Hermes Agent skill that shuttles between Codex and Claude Code
- Claude Fable 5
- GPT-5.6 Sol
- AGENTS.md