How to Test a Planner–Executor Handoff in a Coding Agent

Run four checks on a coding-agent handoff. Use a Kimi patch, a deliberately broken CSV export and two billed calls to decide what a planner has to earn back.

A lilac courier pouch crosses a ledge with its orange seal intact.

To test a planner–executor handoff, keep the original brief and the saved plan, then run checks that exercise the constraints even when the requested change looks correct. In our fixture, the order label changes to “Refund issued”, while the original API field and CSV header must survive. A deliberately altered example looks right on screen and passes three checks. The fourth catches a CSV header change that would break a downstream import. Run both examples below to see how to locate the failure.

One constraint that exposes a bad handoff

Give the planner this brief: rename the label on the orders screen from “Refunded” to “Refund issued”. Preserve the API field name and the exported CSV header because customers already import that file. A good executor brief names the UI location, the literal replacement, the two protected interfaces and a way to test them. Save the exact brief the executor receives alongside its patch.

The sample brief changes the orders-screen label from Refunded to Refund issued while preserving the API field name and the CSV header.

Ofox’s worked handoff brief. Compare the three requirements with the instructions the executor receives; the diagram illustrates the test design.

Download the orders-screen handoff test (ZIP). Give the agent the brief and the starter directory. Keep the reviewer directory separate. After the patch, run python3 reviewer/check.py starter from the kit root. The unchanged starter fails the refunded-label check. Changing only the label passes all four checks, including the API and CSV checks. Inspect the diff separately for changes outside the brief.

Save the plan and run the four checks

  1. Start from a clean copy of the fixture. Give the planner the brief and ask for the intended change, protected interfaces and expected test results. Save its response verbatim.
  2. Give the implementer the original brief and the saved plan. Save the patch and record any manual edits. The sample kit also works without an API call: use the accepted and deliberately broken patches linked below.
  3. Run the reviewer against the resulting files. Keep the output and inspect the diff separately for out-of-scope changes. In our saved Kimi K3.1 Pro plan, both protected interfaces are named explicitly. On December 1, our editor applied a separate replacement returned by Kimi and all four checks passed. The saved plan and accepted patch come from separate calls. The kit lets you exercise the handoff checks with known outputs.

If the model call stops at model access or endpoint errors, restore access before scoring an implementation. Use the Ofox usage record to link charged attempts to the task.

How can I tell whether the planner or the executor lost a requirement?

Read the saved handoff before opening the patch. In our Kimi plan, the API field and the CSV header both had to remain refunded. If a patch changes either one, that requirement survived planning. Compare the changed file with the handoff and run a test that reads the export the way a customer would.

Download the actual Kimi handoff, accepted implementation, test runner and billing rows (ZIP). From the extracted folder, run python3 reviewer/check.py accepted -v. All four checks pass. Then run python3 reviewer/check.py broken_csv -v. This deliberately altered example still shows “Refund issued” and returns the original API field, but writes refund_status as the CSV header. Three checks pass and the export check fails. The broken file is an editorial test fixture; no executor generated it.

Record planning cost separately

The December 1 Kimi planning call cost $0.00747200. The separate call that supplied the accepted replacement cost $0.00659700. The $0.00087500 difference is planning spend above that solo call. We measured the two calls separately, so these figures do not establish the cost of a completed handoff or any time saving.

Use one row per billed call and keep a task ID, stage, amount, retry and acceptance result. Add the planning, implementation and review charges for a task. If you want the fully loaded cost, add editor minutes × hourly rate ÷ 60. For a batch, divide by the number of distinct accepted changes. With zero accepted changes, report total spend and leave the unit cost blank.