← All posts

TPS: Tool-Guided Planning Subagents for Agent Harnesses

Planning should be externalized from the agent's reasoning loop. Plans written in text cannot be perfect, and when actions are limited and some cannot be undone, a single plausible plan can exhaust the remaining budget and leave the task unfinishable. TPS externalizes planning into a tool: planning subagents simulate candidate plans, and an external solver selects the route that satisfies the remaining budget. The solver does not miss feasible routes as an LM does when it selects a path itself, and the check precedes execution.

How TPS avoids irrecoverable failure Top: an existing harness reasons step by step, puts a dirty apple in the fridge, satisfies placement but not cleaning, and cannot recover within the remaining action budget. Bottom: with TPS the agent calls planning subagents, which construct a graph of predicted states with costs and rewards; an external solver selects the path wash, go, open, put, and the agent follows it step by step. Goal: put a CLEAN apple in the fridge Existing harness LM agent Thought: it should go in the fridgeAction: Go to the fridgeThought: the fridge is closedAction: OpenThought: place the apple insideAction: PutThought: it is still dirty. Wash it?Needs 5 actions, 1 left Action budget: 4GoOpenPut Sink Fridge ✓ In fridge ✗ Clean What happened The plan satisfies placement but skips cleaning. Recovery: take out, wash at the sink, put back. That needs 5 actions. 1 remains. Irrecoverable failure No later action sequence can finish within the remaining budget. Existing harness + TPS LM agent Thought: two conditions, tight budgetAction: call the TPS toolPlan from TPS, cost 4 of 4Wash · Go · Open · PutThought: follow plan step 1 of 4Action: WashThought: follow plan step 2 of 4Action: Go to the fridgeThought: follow plan step 3 of 4Action: OpenThought: follow plan step 4 of 4Action: PutResultGoal reached within budget Action budget: 4WashGoOpenPut Sink Fridge ✓ Clean ✓ In fridge Tool-guided planning subagents Internal inference, not charged to the action budget tool call plan Look 1Wash 1Go 1Open+Put 2Put on table 1Put on table 1Wash 1Go 1Open+Put 2 Dirty, lookedDirty, at fridgeDirty, in fridge−1Dirty, on table−1Clean, on table0Dirty, heldClean, at sinkClean, at fridgeClean, in fridge+1 via Look: cost 5 TPS builds a plan graph of predicted states, costs, and rewards, and selects a feasible path within the budget Selected path returned as guidance. The agent reasons step by step and follows it: Wash · Go · Open · Put
How TPS avoids irrecoverable failure. Both panels run on the same clock and loop every 16 seconds. Top: the existing harness reasons step by step, commits to a plan that satisfies placement but not cleaning, and the remaining budget cannot recover from it. Bottom: the agent calls TPS, which builds a graph of predicted states with costs and rewards and selects the one route that reaches the goal within the four-action budget; the agent then follows it step by step.

Introduction

Under a limited action budget, a single planning mistake can make a task impossible to finish.

A language model (LM) agent solves a task by acting in an environment: it runs code, calls application APIs, operates a computer. Around the model sits a harness, the software that feeds the model its inputs, executes the actions it proposes, and returns what happened. ReAct [1], which alternates reasoning and acting, is the canonical loop.

Actions are not free. Some change the environment in ways that cannot be undone. Even the reversible ones spend time or an action budget that is never refunded [2]. Every action the agent takes narrows what it can still do.

The plan is written in text, by the same model that reasons in text, and such a plan cannot be perfect [3]. Most mistakes are cheap: the agent notices, undoes the step or routes around it, and goes on. But every action it took, the wrong one and the ones that undo it, is gone from the budget. The task does not get cheaper in the meantime: from any state there is a minimum number of actions that still finishes it. The moment that minimum exceeds the actions that remain, the task is lost. The agent can see the mistake, and it changes nothing, because spent actions never come back. We call this irrecoverable failure [4]. Such failures are hard to detect at the time: the plan that caused them appeared reasonable and often achieved part of the goal.

The animation at the top of this post shows a minimal instance. An agent holding a dirty apple must put a clean apple in the fridge within four actions. Going to the fridge, opening it, and putting the apple in takes three actions and places the apple in the fridge, still dirty. Recovering requires taking it out, washing it at the sink, and putting it back: five actions, with one remaining. The plan satisfied the placement condition and, in doing so, put the out of reach. Washing first, then going, opening, and putting satisfies both conditions in exactly four.

Summary of gains. Mean task success across domains and best mean validation accuracy in harness optimization, without and with TPS.

Our answer is Tool-guided Planning Subagents (TPS), which externalizes planning from the agent's reasoning loop into a tool that plugs into an existing harness. Inside the tool, it separates two tasks that LMs perform unequally well: predicting where a step leads, which they do well, and verifying that an entire plan fits a budget, which they do poorly. When the agent needs a plan, it calls the tool. Planning subagents predict candidate futures and organize them as a graph, and an external solver selects the route through that graph that reaches the goal within the remaining budget. The route is returned as guidance, and the agent continues in its original loop.

TPS

LM subagents predict candidate futures as a graph, and an external solver selects the path within the budget.

When the main agent calls TPS, it hands over three things: its history hh, the goal gg, and the remaining budget bb. If the task limits more than one quantity, say time and a number of actions, bb has one entry per limit. Four subagents then run in sequence, using the same LM as the main agent with stage-specific prompts.

  1. Multi-plan sampling. The first subagent generates MM different candidate plans. A plan is a sequence of subplans, and a subplan is one step the main agent can carry out with one or more concrete actions. "Pin the dependency to version 1" is a subplan; the exact command is left to the main agent.
  2. State simulation. The second subagent walks each candidate and predicts the state after every subplan, together with what the step costs. Costs are nonnegative vectors with the same entries as bb.
  3. State merging. The third subagent merges predicted states that are equivalent for the rest of the planning. Candidates that pass through the same state now share a node, each subplan becomes an edge with its predicted cost, and the candidates have become a plan graph.
  4. Reward prediction. The fourth subagent labels every node: +1 if the goal is satisfied there, -1 if it is a dead end, 0 otherwise.
The TPS procedure, step by step A coding agent must fix a checkout endpoint that returns 500 errors and redeploy with passing tests within 15 minutes. It calls TPS. The subagents sample six candidate plans, simulate each into predicted states with time costs, and merge the states that several plans share into one plan graph of twelve states and fourteen edges: Bad commit leads to Cause found or Rolled back, and a failing test after a client patch can still lead to Handler fixed. They predict rewards: +1 for a live fix with passing tests, −1 for an untested deploy, 0 otherwise. Three routes reach +1; an external solver selects check logs, patch handler, run tests, deploy at 10 minutes, since bisecting first would take 17 minutes and patching the client first 16. The agent follows the plan step by step. Task: fix the failing checkout endpoint and redeploy with passing tests within 15 min LM agent harness + TPS LM agent Thought: checkout down, 15 min leftAction: call the TPS toolPlan from TPS, 10 of 15 minlogs · patch · test · deployThought: follow plan step 1 of 4Action: check the logsThought: follow plan step 2 of 4Action: patch the handlerThought: follow plan step 3 of 4Action: run the testsThought: follow plan step 4 of 4Action: deployResultFixed and live in 10 min Time budget: 15 min 0 min used 1 min used 3 min used 7 min used 10 min used, 5 min to spare $ curl -i /checkout -> 500 Internal Server Error $ tail -n 50 app.log -> TypeError: price is None $ git diff -> handler.py: guard against null price $ pytest -> 128 passed $ deploy prod -> /checkout 200 OK Tool-guided planning subagents Internal inference, not charged to the action budget tool call plan 1 Sample plans 1 Sample plans 2 Simulate 2 Simulate 3 Merge states 3 Merge states 4 Predict rewards 4 Predict rewards 5 Select path 5 Select path Plan 1: check logs → patch handler → run tests → deploy Plan 2: bisect commits → inspect diff → patch handler → run tests → deploy Plan 3: revert last deploy → run tests → deploy Plan 4: check logs → patch handler → deploy Plan 5: patch client → run tests → patch handler → run tests → deploy Plan 6: bisect commits → revert commit → run tests → deploy patch client 180 sbisect 420 srevert 300 sinspect diff 60 srevert commit 300 srun tests 240 spatch handler 120 sdeploy 180 srun tests 240 sdeploy 180 scheck logs 60 spatch handler 120 srun tests 240 sdeploy 180 s Plan 1Endpoint downcheck logs 60 spatch handler 120 srun tests 240 sdeploy 180 sPlan 2Endpoint downbisect 420 sinspect diff 60 sCause foundpatch handler 120 sHandler fixedrun tests 240 sTests passdeploy 180 sFix livePlan 3revert 300 srun tests 240 sdeploy 180 sPlan 4Endpoint downcheck logs 60 sCause foundpatch handler 120 sHandler fixeddeploy 180 sPlan 5Endpoint downpatch client 180 srun tests 240 spatch handler 120 sHandler fixedrun tests 240 sTests passdeploy 180 sFix livePlan 6Endpoint downbisect 420 sBad commitrevert commit 300 sRolled backrun tests 240 sOld tests passdeploy 180 sOld build live Bad commitRolled backOld tests passOld build liveUntested liveClient patchedTests fail−100Cause foundHandler fixedTests passFix liveEndpoint down +1 via bisect: 17 minvia client: 16 min Sample M = 6 diverse candidate plans from the history (checkout returns 500) and the goal Simulate each plan: a predicted state summary and a time cost after every subplan Merge summaries that are equivalent for the rest of planning: states shared by several plans become one node Predict a reward per node: +1 fix live with passing tests, −1 untested deploy, 0 otherwise External solver: maximize reward subject to total time ≤ 15 min. Three routes reach +1; bisect first takes 17 min, client first 16 Selected path returned as guidance. The agent follows it: check logs · patch handler · run tests · deploy, 10 min
The TPS procedure, step by step. A coding agent is paged: the checkout endpoint returns 500 errors, and it must be fixed and redeployed with passing tests within 15 minutes. The loop runs 23 seconds. The subagents sample six candidate plans, simulate each into predicted states with time costs, and merge the states that several plans share into one plan graph of twelve states and fourteen edges: Bad commit leads either to Cause found or to Rolled back, and a failing test after a client patch can still lead to Handler fixed. They then predict a reward per node: +1 for a live fix with passing tests, −1 for deploying untested code, 0 for rolling back or failing tests. Three routes reach the goal; the solver picks the only one that fits the budget, check logs, patch handler, run tests, deploy at 10 minutes, because bisecting first would take 17 and patching the client first 16. The agent then follows it one step at a time.

The solver then does the part that LMs are least reliable at: constrained selection. The selected path is

π⋆∈arg max⁡π∈PR(π)subject to∑e∈πc(e)⪯b,\pi^\star \in \operatorname*{arg\,max}_{\pi \in \mathcal{P}} R(\pi) \quad \text{subject to} \quad \sum_{e \in \pi} c(e) \preceq b,

Notation
h, g, bh,\ g,\ b
the agent's history, the goal, and the remaining budget, a vector with one entry per limit
G=(V,E)\mathcal{G} = (V, E)
the plan graph: nodes are predicted states, edges are subplans
v0v_0
the start node, which summarizes the current history
c(e)c(e)
the predicted cost of subplan ee, with the same entries as bb
r(v)r(v)
the predicted reward of node vv: +1+1, 00, or −1-1
π, P\pi,\ \mathcal{P}
a walk from v0v_0, and the set of walks that reach a +1+1 node
R(π)R(\pi)
the cumulative predicted reward of a walk
⪯\preceq
element-wise inequality

Among the walks that reach a goal node, the solver selects the one with the highest predicted reward whose total predicted cost stays within the budget in every entry. We use [5] by default. [6], [7], and work on the same graph. This division of labor is the central design choice: the LM predicts outcomes, and the solver guarantees that the selected path respects the budget, to the extent that those predictions are correct.

Because TPS is exposed through the standard tool interface, it plugs into any harness that can call tools without changes to the harness's reasoning loop. The harness does not need to know that planning happened, only that a plan was returned. The figure shows the same call in three harnesses.

Harness
TPS inside ReAct ReAct with TPS as an extra tool. The agent observes that it holds a dirty apple with six actions left, decides that planning is needed, and calls tps. The tool samples four plans, simulates them, merges them into a graph, and the solver returns a feasible path of cost five. The plan comes back as a tool result and the agent follows it action by action, free to call the tool again if an observation contradicts the plan. ReAct + TPS Task: put a clean apple in the fridge, 6 actions left Tools environment actions tps LM agent ObservationYou are in the kitchen, holding a dirty apple 1.Budget: 6 actions. ThoughtTwo conditions and a tight budget. Ask the planning tool. Actiontps() ResultPlan, cost 5 of 6: go to sinkbasin 1, clean apple 1 withsinkbasin 1, go to fridge 1, open fridge 1, put apple 1 in/on fridge 1 ThoughtFollow the plan: step 1 of 5. Actiongo to sinkbasin 1 ObservationYou arrive at sinkbasin 1. Budget: 5 actions. ThoughtStep 2 of 5. The plan still matches what I see. Actionclean apple 1 with sinkbasin 1 ObservationYou clean the apple 1 using the sinkbasin 1. Budget: 4. If an observation contradicts the plan, the agent can call tps() again. Tool-guided planning subagents the same tool in every harness 1 Sample 4 candidate plans 1 Sample 4 candidate plans 2 Simulate states and costs 2 Simulate states and costs 3 Merge into a plan graph 3 Merge into a plan graph 4 Solver: feasible path, cost 5 ≤ 6 4 Solver: feasible path, cost 5 ≤ 6 Returned plan, 5 subplans: sinkbasin · clean · fridge · open · put call plan
The same tool in three harnesses. One step of each harness on the same task, an ALFWorld-style kitchen where the agent holds a dirty apple and has six actions left. In ReAct, TPS is one more tool in the reasoning and action loop. In a Recursive Language Model, the history lives in a Python REPL and TPS is one more function the root LM can call; the plan it returns stays in a REPL variable. In Tree of Thoughts, TPS is a planning meta-action at the root of the search: its branch rolls in the returned plan, and the evaluator scores it like any other chain. On the Sokoban games, the ToT variant instead uses the paths that four independent searches select as the candidate plans for the graph. Hover over any element for details.

Results

Adding the tool to three harness families on eight benchmarks increases success in every case.

For each harness we compare Base, the harness on its own, with Base + TPS, the same harness with TPS exposed as a planning tool, under the same benchmark-specific environment-execution limits. We report success rate and use ILP as the solver. For the game and text-world tasks the harnesses are ReAct [1], Recursive Language Models (RLM, recursion depth 2) [8], and Tree of Thoughts (ToT) [9], all driven by gpt-4.1-mini. The benchmarks are Sokoban, Snake, BlocksWorld, ALFWorld, and ScienceWorld.

Success across game and text-world tasks. Success increases in every evaluated benchmark and harness pair, with larger gains on ALFWorld than on ScienceWorld.

The mean gain is 38.7 points across the games and 25.2 across the text worlds, and the pattern follows the problem setting. The largest gains, on Sokoban and ALFWorld, occur in tasks where an early wrong move exhausts the budget. The smallest, on ScienceWorld, occurs in the task with the longest and most open-ended episodes, where predicting the outcome of a subplan is hardest.

Coding agents are the harder test. The harness runs shell commands, calls application APIs, or executes a machine-learning workflow, and each base harness is already tuned for its benchmark. We add TPS to Terminus-KIRA on Terminal-Bench 2.0, to ReAct on AppWorld, and to CodeAct on MLGym-Bench, all with claude-haiku-4.5 as the backbone.

Success on coding agentic tasks. The evaluated shell and API harnesses achieve higher observed success with planning support. Terminal-Bench reports task-averaged success.

The mean gain is 6.2 points, smaller than in the games, as expected when the harness already encodes most of the task knowledge, but in the same direction on all three benchmarks.

Why it helps

TPS uses fewer environment actions, and the solver finds feasible paths that the LM misses.

Sokoban lets us look inside the gains, because an oracle knows the minimum number of actions T⋆ needed to finish from any state. That gives a budget with a known amount of slack: Benv = T⋆ + Δ for Δ ∈ {2, 4, 8, 16}. We compare ReAct with ReAct + TPS, using gpt-4.1-mini and four candidate plans.

Success and action use across Sokoban budgets. The three panels show success, the share of the action budget consumed, and the number of episodes with insufficient remaining budget. Across budgets relative to an optimal solution, TPS maintains higher success, consumes a smaller share of the budget, and less often leaves too few actions to finish.

More slack alone does not close the gap. As the budget grows, TPS success rises from 70% to 92%. ReAct stays between 8% and 15% across the same range. Planning is what lets the agent turn extra actions into completed episodes.

TPS uses fewer actions while succeeding more often. Averaged over all episodes, including failures, TPS consumes 40.5% of the budget at Δ = 16, compared with 92.9% for ReAct.

It rarely paints itself into a corner. The oracle identifies the first action after which the goal is still reachable but needs more actions than remain. TPS reduces the number of such episodes from 91 to 29 at Δ = 2 and from 75 to 6 at Δ = 16, out of 100 per configuration.

To separate the contribution of the solver from that of the graph, we give gpt-4.1-mini and ILP the identical recorded graph, with the same nodes, edges, rewards, costs, and remaining budget, and ask each for a feasible path, counting only graphs on which one exists.

Graph nodesLM finds a feasible path (%)ILP finds a feasible path (%)
≤ 1095.2100.0
11 to 1597.7100.0
16 to 2093.9100.0
≥ 2184.6100.0

The LM misses paths that exist, and misses more of them as the graph grows: on graphs with at least 21 nodes it finds a feasible path in 22 of 26 cases, while ILP finds one in all 26. Even with the whole graph in front of it, constrained selection is a job for a solver. This is an error that externalizing planning to a solver removes.

A component ablation asks whether each stage is necessary, or whether generating candidates and selecting one suffices. On Sokoban, with Qwen3-14B as both executor and planner, each stage adds to success.

VariantSubagentsMultiple plansPlan graphSolverSuccess (%)
ReAct11 ± 3.1
Single plan✓13 ± 3.4
Best-of-N✓✓20 ± 4.0
Graph + LM selection✓✓✓29 ± 4.5
TPS✓✓✓✓37 ± 4.8

Best-of-N selection among four plans reaches 20%. Organizing the same candidates into a graph and letting the LM pick a path reaches 29%. Handing the selection to the solver reaches 37%.

Practical considerations

The guarantee holds only on the predicted graph, and planning has an inference cost.

Graph accuracy. Externalizing planning removes the errors the LM makes when it chooses a path itself, not the errors in its predictions. The solver guarantees feasibility only on the graph it is given, and if the graph is wrong, the guarantee is wrong with it. The subagents make three kinds of prediction: which states are the same, what state a step leads to, and which states earn the reward. We checked each against the real environment.

Accuracy of the plan graph. Merging is nearly exact in both environments. State estimation is right 97% of the time on Sokoban and 78% on ALFWorld. A state the graph marks as reaching the goal is a real goal state 96% of the time on Sokoban and 60% on ALFWorld.

Merging is the most reliable step, and its mistakes fall on the safe side: a pair of equivalent states that stays unmerged cannot add a false path. On ALFWorld, reward prediction is where most of the remaining failures live. A plan that is feasible on the graph can still fall short in the environment, so in deployments where actions have real consequences, the plan still needs task-appropriate permissions and validation before execution.

Inference cost. TPS spends additional LM calls before acting. A natural alternative use of that compute is a larger planning advisor that hands a smaller base model one plan, or four plans with LM-based selection. We compare the two on Sokoban with the Qwen3 family, counting every LM call: base agent, subagents, and advisor. Hover a point for the exact numbers.

Success against inference compute. Each point is one configuration on Sokoban, labeled with its base model size; lines join the sizes of one configuration. A 4B model planning for itself with TPS reaches the success of a 14B model guided by a 32B Best-of-4 advisor at about half the compute, and the observed frontier ends in the TPS points. With a 14B base, TPS is 15 points ahead of the stronger advisor configuration; with an 8B base, the advisors are slightly ahead.

The subagents simulate the base model's own futures, so the benefit grows with a base model that can do that well, and at 0.6B the subagents cannot build a usable graph at all. Planning adds inference cost; the trade is favorable for a model that can simulate its own futures.

Harness optimization

Harness optimization is an agentic task under an evaluation budget, and the same tool applies to it unchanged.

Meta-Harness [10] improves an agent's harness automatically. An LM proposer reads the current harness code, its execution traces, and its evaluation scores, then writes a revised candidate. A fixed task model runs the candidate on validation examples, and the scores guide the next revision. Evaluations are the scarce resource, so the proposer has to anticipate which revisions will pay off before spending evaluations on them. This is a planning problem under a budget.

We treat harness optimization as an agentic task. The proposer is the agent, a revision of the harness is an action, a candidate harness is a state, and the evaluation budget is the action budget. Under this , the same tool applies without modification.

We follow the main Meta-Harness setup: a Claude Sonnet 5 proposer, a fixed gpt-oss-20b task model, and three datasets (reactant prediction on USPTO, disease prediction from symptoms on Symptom2Disease, and charge prediction from case descriptions on LawBench), with three seeds per dataset, 12 iterations, and three candidate evaluations per iteration. The proposer calls TPS to plan its revisions. Each node of the plan graph is a candidate harness and each edge is a revision of its parent. The subagents predict how a revision would change the harness's behavior on training examples, and can extend a predicted candidate with further revisions. The solver picks which candidates to implement and evaluate within the per-iteration budget, and the resulting validation scores inform the next proposals.

One iteration of harness optimization with TPS Iteration 9 of a Meta-Harness run, replayed from its logs. The proposer calls TPS. The tool audits the last batch, then a planner subagent proposes nine harness revisions in three rounds of lookahead, each with a predicted accuracy range. The solver adds a calibration offset of 2.0 points to each predicted low, ranks the candidates, and selects the top three: 44.1, 43.9, and 43.2. The proposer implements one of them as proposed, cooccurrence_gated_pruning, and replaces the other two with its own designs. The benchmark returns 43.5, 42.7, and 35.4. The adopted pick is a new best, up from 42.4, and lies inside its predicted range of 41.9 to 43.8. Goal: raise the harness's validation accuracy with 3 evaluations per iteration Meta-Harness proposer + TPS Proposer Thought: best so far is 42.4Action: call the TPS toolSuggestions from TPSTop 3 of 9 candidatesThought: adopt 1, add 2 of my ownAction: write 3 harnessesThought: spend the 3 evaluationsAction: run the benchmarkResultNew best: 43.5 (was 42.4) Evaluations this iteration: 3 43.5 42.7 35.4 # validation accuracy, 3 datasets x 3 seeds cooccurrence_gated_pruning 43.5 batch_lesson_distillation 42.7 answer_first_repair_retry 35.4 best so far: 42.4 -> 43.5 Tool-guided planning subagents Internal inference, not charged to the evaluation budget tool call plan 1 Audit last batch 1 Audit last batch 2 Propose revisions 2 Propose revisions 3 Calibrate and rank 3 Calibrate and rank 4 Select top 3 4 Select top 3 Evaluated harnesses Round 1 Round 2 Round 3 atom_frequency_gated_completionrealized 42.4, best so far proactive_label_similarity_notesrealized 41.5 dual_signal_specificity_gate40.7–45.042.7segmented_containment_pruning41.1–44.843.1verified_clause_completion_pruning40.6–45.342.6cluster_biased_exemplar_retrieval38.8–44.840.8bias_snap_cluster_retrieval38.7–47.040.7recurrence_gated_bias_snap37.8–46.739.8neighbor_specificity_completion42.1–44.144.1frequency_ratio_gated_specificity41.2–44.543.2cooccurrence_gated_pruning41.9–43.843.9 best case 47.0, low 38.7: passed over 44.1kept for later43.943.2kept for later Final batch chosen by the proposer cooccurrence_gated_pruning41.9–43.8TPS pickrealized 43.5 batch_lesson_distillation41.5–43.7own designrealized 42.7 answer_first_repair_retry35.1–38.0own designrealized 35.4 new best Audit: realized scores go back into the graph. Across 18 past predictions, realized ran 2.0 points above the predicted low Planner subagent: three rounds of lookahead on real failing samples. Each candidate revises its parent and gets a predicted range Solver: calibrated low = predicted low + 2.0. It ranks by the score a candidate should at least reach, not by its best case Solver: the top 3 calibrated lows fill this iteration's 3 evaluations: 44.1, 43.9, 43.2 The proposer decides: it implements one pick as proposed and replaces two with its own designs. Unused picks stay in the graph Evaluation: 43.5 is a new best and lies inside the predicted range 41.9 to 43.8. The scores feed the next audit
One iteration of harness optimization with TPS. Iteration 9 of the run, replayed from its logs. It is batch 8 in the chart below. The proposer calls TPS. The tool first audits the last batch. A planner subagent then proposes nine revisions in three rounds of lookahead, each checked on real failing samples and given a predicted accuracy range. The solver adds a calibration offset to every predicted low, ranks the candidates by that value, and selects three for the iteration's three evaluations. The proposer has the last word: it implements one pick as proposed and replaces two with its own designs. The pick reaches 43.5, a new best. Hover over a candidate to read what it changes.
Harness optimization in Meta-Harness. Lines track the best mean validation accuracy so far; translucent points show individual candidate scores. Under the same evaluation budget, TPS reaches a higher final best score. The panel under the chart steps through the eleven batches of three evaluations and shows what each run built: the score, what the harness changes, and the harness it revises. For the run with TPS it also shows where each harness came from.

Base Meta-Harness reaches 42.4% and plateaus. With TPS the proposer keeps finding improvements and reaches 45.9%. The curves cross along the way, so the claim is about the final best score within the budget, not about every step. It is a small experiment, but it shows the same planning tool moving from acting in an environment to searching over programs.

Future work

Open directions for the objective, the solver, the graph, and the search space.

  • Soft targets inside hard limits. TPS enforces strict execution limits. Many tasks also have a preferred completion time, and the objective can take that in directly: keep the budget constraint and subtract a weighted penalty for exceeding the preferred target from the path score. The planner could then spend more time when the predicted gain in quality is worth the delay, and still never break the hard limit.
  • A solver chosen per call. Selection is a plain optimization problem, and integer programming, resource-constrained shortest paths, constrained tree search, and greedy selection trade quality against runtime differently as graphs grow. The tool sees the task formulation and the graph before it solves, so choosing the solver from that structure is a natural next step.
  • Better graphs. The graph-accuracy figure shows where predictions are weakest: reward prediction and state estimation on ALFWorld. A verifier subagent, environment feedback folded in while acting, or subagents trained on replayed states all plug into the same interface without touching the solver. Adapting the number of candidates and the simulation horizon to the compute available would make each call cheaper as well.
  • Planning with exploration. Today the subagents build futures from the model's knowledge and the task history. When the dynamics are unknown, part of the same budget could go to actions that reveal them, so that knowledge acquisition and task progress share one interaction budget.
  • Other search spaces. Harness optimization showed the tool planning over programs rather than environment actions. Prompts, tool sets, and agent workflows are search spaces of the same shape: a revision is an action, a candidate is a state, and evaluations are the budget.

References

  1. Shunyu Yao et al. ReAct: Synergizing reasoning and acting in language models. ICLR 2023. arxiv.org/abs/2210.03629
  2. Yuanhang Zheng et al. Budget-constrained tool learning with planning. Findings of ACL 2024. arxiv.org/abs/2402.15960
  3. Karthik Valmeekam, Matthew Marquez, Sarath Sreedharan, and Subbarao Kambhampati. On the planning abilities of large language models: A critical investigation. NeurIPS 2023. arxiv.org/abs/2305.15771
  4. Zehong Wang et al. Why reasoning fails to plan: A planning-centric analysis of long-horizon decision making in LLM agents. arXiv:2601.22311, 2026. arxiv.org/abs/2601.22311
  5. Alexander Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, 1998.
  6. John E. Beasley and Nicos Christofides. An algorithm for the resource constrained shortest path problem. Networks, 19(4), 1989.
  7. Jongmin Lee, Geon-Hyeong Kim, Pascal Poupart, and Kee-Eung Kim. Monte-Carlo tree search for constrained POMDPs. NeurIPS 2018.
  8. Alex L. Zhang, Tim Kraska, and Omar Khattab. Recursive language models. arXiv:2512.24601, 2025. arxiv.org/abs/2512.24601
  9. Shunyu Yao et al. Tree of Thoughts: Deliberate problem solving with large language models. NeurIPS 2023. arxiv.org/abs/2305.10601
  10. Yoonho Lee, Roshen Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, and Chelsea Finn. Meta-Harness: End-to-end optimization of model harnesses. COLM 2026.

BibTeX

arXiv preprint (coming soon)

@article{jeong2026tps,
  title         = {Integrating Tool-Guided Planning Subagents into Agent Harnesses as a Tool},
  author        = {Jeong, Jongwon and Kim, Jungtaek and Kang, Minki and Lee, Kangwook},
  journal       = {arXiv preprint arXiv:},
  year          = {2026},
  eprint        = {},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {}
}