acceptodds
Under review as a conference paper at ICLR 2027

Your OpenClaw, but Much More Efficient

Abstract

General-purpose agents such as OpenClaw transmit their complete tool inventory, framework instructions, and interaction history to the model at every step, although each action typically depends on only a small subset of this context. We formalize this observation through the sufficient exposure of a request, defined as the least costly reduction of the full request that preserves task performance within a prescribed tolerance. Context beyond the sufficient exposure incurs two costs: redundant token consumption and distraction from irrelevant capabilities, which can degrade the model's decisions. Improving agent efficiency thus amounts to estimating the sufficient exposure online, a problem with asymmetric error costs: over-exposure incurs these costs gradually, whereas under-exposure withholds information required for correct execution. Motivated by this asymmetry, we propose LeanClaw, a request-level exposure controller for OpenClaw. LeanClaw initializes the exposed tool set from a compact prior over necessary tools and adapts it as execution feedback reveals new requirements or retires old ones. It extends the same criterion to interaction history through structured state preservation and duplicate removal, and it reverts to broader exposure whenever its estimate is uncertain. All runtime capabilities remain available; only the capabilities exposed in each request are altered. Across five benchmarks spanning mathematical reasoning, code generation, and reading comprehension, LeanClaw reduces token consumption by 46.64–59.29% relative to OpenClaw while improving task performance on every benchmark. On RealClawBench, it matches OpenClaw's success rate with 48.15% fewer tokens. Evaluations across multiple foundation models further demonstrate that these efficiency gains generalize beyond a single model route. Code is available at https://anonymous.4open.science/r/leanclaw-08BF.

Primary area:
other topics in machine learning (i.e., none of the above)
Keywords:
LLM agent

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_AZBcOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper discusses the idea of sufficient exposure of an agent request, backing it up experimental results. Further, to reduce token cost and improve agent's ability, the paper proposes LeanCalw to estmate sufficient exposure and control the exposed context.

Critical strengths
  1. The proposed LeanClaw shows great empirical improvement across the benchmarks, saving significant amount of tokens while maintaining or improving task performance.
Critical weaknesses
  1. Most details about the proposed algorithm is not clearly described in the paper. (Examples in the questions) I expect the details are contained in the provided codes but I cannot access it from the provided link. Even with codes provided, clear disclosure of procedure details would be necessary for readers to understand what's happening and evaluate the novelty of the proposed method.
Questions for authors
  1. For the initial exposure McoreM_{core} and MtaskM_{task}, how are they decided?
  2. What does the UpdateProfileUpdateProfile procedure do?
  3. How is the controller's confidence qtq_t defined? How is the threshold τ\tau decided?
  4. As I understand, modifying the toolset at each round effectly change the input prompt and may make the cache invalid. Will this impact the cost of the provided method? If so, is this impact taken into account when calculating all the costs in the paper?
3 comments

Weakness 1: Algorithm and code accessibility

Thank you for flagging both the link and disclosure issues.

Response: We rechecked the anonymous repository link and confirmed that it is accessible. The code is also included in the supplementary attachment, so the implementation is available through two routes.

Question 1: How are Initial Exposure and Exposure Profile Determined?

Thank you for asking how initial exposure is determined.

Initial exposure comes from the task-conditioned tool prior. When the planner is enabled, it returns the necessary tools and budget points; deterministic normalization then supplements tools based on task risk guards. If the planner is ineffective, deterministic seed rules are used, and fail-open is triggered when confidence is low. Afterward, the exposure profile continues to update based on execution status and feedback, rather than remaining fixed after the first request.

We will include a detailed trace in the appendix showing the task text, initial tool set, feedback signals, updated exposure set, and runtime tool registry.

Question 2: What exactly does the Adapt process do?

Thank you for requesting a concrete account of Adapt.

Adapt translates the current task, interaction messages, execution status, and available tool list into the next model-visible exposure decision. It selects or retains tools based on the matching task or feedback signals at the current stage, recording added, removed, and retained tools and confidence; fail-open is triggered when selection is empty or below the threshold. This process only filters the provider-facing schema view and does not remove tools from the runtime registry or execution bridge.

We will replace the current overly abstract description with pseudocode and decision tables, and clearly define the boundaries between the planner-driven and deterministic guard parts.

Question 3: How is Confidence defined, and how is the threshold determined?

Thank you for asking about the score and threshold.

In the current deterministic selector, confidence is a score truncated to 1 after dividing the number of matched tasks or execution signals by 3. The default threshold is 0.25. When the score is below the threshold or the selection is empty, the system uses a wider fail-open exposure.

Question 4: Cache-aware cost.

Thank you for highlighting the potential cache effect.

Changing tool patterns or retaining historical records can affect the prefix cache, so simply reducing the number of tags is insufficient to demonstrate cost savings. We report the number of cached and non-cached input tokens recorded by the provider, along with billing costs, including LeanClaw's planner calls:

MethodCached InputNon-cached InputOutputTotal Provider TokensProvider-Reported Cost
OpenClaw21.354 million24.127 million996,00046.476 million$2.9915
LeanClaw (with planner)11.245 million11.74 million891,00023.876 million$1.5688

In this RealClawBench full281 run including caching, LeanClaw's token-level cached input share was 48.92%, while OpenClaw's was 46.95%. Therefore, the observed aggregate cache share did not decrease. Total provider tokens decreased by 48.63%, while provider-reported cost decreased by 47.56% after accounting for planner overhead. For the cached/uncached token breakdown and cost comparisons across benchmarks, see our response to Weakness 1: Cache-aware inference costs.

Thank you for your rebuttal. For the latest revision, the pdf file does not look like ICLR submission format. Please confirm that the uploaded PDF follows the ICLR submission requirement.

Thank you for pointing this out. We have corrected the formatting and regenerated the PDF using the official ICLR 2027 submission template. We hope that these corrections address your concern and will support a favorable reconsideration of our submission.

Best regards,

Authors

Reviewer_oeTEOpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

This paper proposes a context optimization framework for OpenClaw agents. It dynamically selects relevant tools, compresses interaction history, and restores broader context base on needs. LeanClaw builds on OpenClaw and provide three components potentially provide the improvement: adaptive tool exposure, structured state preservation with history compaction, and a fail-open mechanism that restores broader context when necessary. Experiments show 46–59% token reduction across five benchmarks while maintaining accuracy. On RealClawBench, it achieves the same success rate with 48.15% fewer tokens.

Critical strengths
  1. The challenge proposed by the paper is meaningful. Full tool schemas and interaction history can introduce substantial computational overhead.
  2. Broad evaluation with useful ablation studies.
Critical weaknesses
  1. The core adaptive mechanism lacks sufficient implementation details. The method is described in high level. e.g., The paper do not explain the criteria used to identify necessary tools, add or remove tools during execution, or determine when the fail-open mechanism should be triggered.

  2. A central argument of the paper is adaptive tool exposure should benefit fixation or one-shot selection. but the controlled comparison in Table 4 primarily considers non-adaptive baselines, including fixed necessary-tool selection and one-shot retrieval approaches adapted from ToolLLM and Re-Invoke.

  3. The controlled comparison is conducted on only 40 RealClawBench tasks which is not sufficient to conclude the reliability.

Questions for authors
  1. Could the authors clarify how the necessary-tool prior and subsequent tool updates are determined? Rule-based or LLM driven? Thres for the decision?

  2. A comparison will better demonstrate the proposed method: How would LeanClaw compare against a simpler approach that performs tool retrieval at every execution step, or starts with a minimal tool set and falls back to full exposure when necessary?

  3. Proposition1 assumes that required tools are never withdrawn once exposed, while Eq. 4 permits removing tools that are considered no longer relevant. Could the authors clarify how the implementation satisfies this assumption, particularly when previously removed tools become necessary again?

  4. On Realclawbench, whether the equal aggregate success rate shows differences in task-level reliability?

3 comments

Weakness 1: Adaptive mechanism details

Thank you for pointing out the missing implementation details.

We agree that the original description of the controller was too abstract and insufficient for reproducibility. The current implementation comprises three phases. First, an initial tool prior is constructed based on the task and available tool list; when the planner path is enabled, the planner returns a minimum tool set and budget point. Second, after each request, the controller updates the model-visible tool set based on the current message, execution evidence, remaining goals, unresolved errors, artifacts, and validation signals. Third, when the selection confidence is low, the selection is empty, or the plan is invalid, it falls back to a wider deterministic tool set; the runtime registry remains unchanged.

The current deterministic selector's confidence is a normalized score of the number of matching signals, limited to 1; the default threshold is 0.25. Exact replication, strict formatting, artifacts, and validation guards prevent over-compression when precise evidence is required. We will include pseudocode, decision tables, full prompts, thresholds, and fallback conditions in the main text or appendix.

Weakness 2: Fixed and one-shot controls

Thank you for suggesting stronger adaptive controls.

Response: Table 4 already provides a controlled comparison with fixed and one-shot tool-exposure strategies. On the same RealClawBench cases, LeanClaw achieves 97.5% accuracy, compared with 87.5% for Necessary-only and 90.0% for both ToolLLM-style and Re-Invoke-style. It also exposes fewer schemas per request on average (5.35 versus 6.00–6.89). Thus, the existing comparison supports our claim relative to the fixed and one-shot controls evaluated in the paper.

Weakness 3: Reliability of the 40-case comparison

Thank you for questioning the scope of the 40-case result.

Response: We agree that the 40-case comparison alone cannot establish benchmark-wide reliability. We therefore extended the analysis to all 281 RealClawBench cases. The methods use the same case set, model route, and verifier; LeanClaw’s result below includes four additional recovery rounds and is identified separately from the single-run controls.

StrategyVerifier accuracySchemas/request
Necessary-only40.57%6.00
ToolLLM-style43.77%6.67
Re-Invoke-style42.70%6.66
LeanClaw44.48%5.06

The expanded evaluation addresses the sample-size concern,

Question 1: How are the initial prior and subsequent updates determined?

Thank you for asking for a more precise selection rule.

The initial prior is derived from the task description, available tool names, and deterministic task signals; when the planner is enabled, it also returns a compact JSON plan. Updates during execution use recent messages, completed and remaining goals, tool dependencies, unresolved errors, artifact signals, validation signals, and explicit feedback. New signals can be added to tools; stage completion signals can remove tools from the model-visible set. Removal only affects exposure; the runtime registry and executable bridge retain the complete tool inventory.

The current deterministic confidence is a score normalized to 1 based on the number of matching signals, with a default threshold of 0.25. Low confidence or empty selections trigger fail-open. We will add complete feature definitions, thresholds, and decision tables to map the notation in the paper to the implementation. Details will be supplemented in the appendix of the paper later.

Question 2: Comparison with adaptive controls

Thank you for suggesting these two comparisons.

改Response: We implemented the two suggested adaptive controls and reran them alongside LeanClaw on the same RealClawBench cases, with the model route, verifier, workspace initialization, and main-request limit held fixed. Per-step retrieval selects tools before every provider request; its planner calls are included in token and cost accounting. Minimal-plus-full-recovery begins with six core tools and retains full exposure after a tool error.

StrategyVerifier accuracySchemas/requestProvider tokensProvider cost
LeanClaw85.0%5.222.671M$0.1440
Per-step retrieval77.5%5.283.138M$0.1821
Minimal-plus-full-recovery85.0%9.863.850M$0.1803

Response: We added the two suggested adaptive controls. LeanClaw achieves 85.0% verifier accuracy, matching minimal-plus-full-recovery and exceeding per-step retrieval (77.5%). It also exposes the fewest schemas per request (5.22) and has the lowest provider-token use (2.671M) and cost ($0.1440). These results show a favorable accuracy–exposure–cost trade-off against both controls on this case comparison.

Question 3: Proposition 1 Assumes Tools Will Not Be Removed

Thank you for identifying the inconsistency.

This question points to a true scope mismatch in the original document. Proposition 1 assumes the exposure set monotonically increases, while the actual implementation can modify the model-visible set and may remove tools. Removed tools can be re-exposed when selected again by a subsequent task or feedback signal; the underlying runtime capability is never removed.

We will revise the theoretical part, clarifying that Proposition 1 only applies to the monotonic variant. The actual controller uses a reversible exposure policy. We will also add a regression test to verify that previously hidden tools can be re-exposed when they become necessary again, while the runtime executable capability space remains unchanged.

Question 4: Task-level reliability

Thank you for raising the task-level reliability question.

Response: Equal aggregate pass counts do not establish that OpenClaw and LeanClaw pass the same tasks. We audited the available paired case-level records from a separate, full281 run and grouped verifier outcomes by RealClawBench task category:

Task categoryCasesBoth passOpenClaw onlyLeanClaw onlyNeither passes
File creation57169923
Code fixing63245628
Data queries88369637
Command execution2492112
Project building49187519
Total2811033227119

This run shows task-level substitutions: 32 cases pass only under OpenClaw and 27 only under LeanClaw.

Thanks for the detailed response and additional experiments. The new comparisons address some of my concerns, especially regarding the adaptive baselines and evaluation size. However, I still have concerns about the theoretical assumptions and the clarity of the method. I would keep my original rating.

Reviewer_exB7OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

This work investigates context management and efficiency challenges in general-purpose agents, such as OpenClaw. The authors argue that conventional agent frameworks repeatedly transmit complete contexts, including tool inventories, framework instructions, and interaction histories, resulting in substantial token redundancy and potentially distracting models from making correct decisions. Meanwhile, existing context compression methods may inadvertently remove necessary tools or critical execution evidence. To address these challenges, the authors propose LeanClaw, a request-level exposure controller that separates capability availability from capability exposure. LeanClaw initializes each request with a compact set of necessary tools and adaptively adjusts tool exposure based on execution feedback. It further incorporates structured state preservation, history compaction, and duplicate removal, with a fail-open mechanism that restores broader context when necessary. Experiments across five standard benchmarks and RealClawBench demonstrate that LeanClaw reduces token consumption by 46.64%–59.29% on standard benchmarks while matching or improving task performance across multiple foundation models.

Critical strengths
  1. Important and practical research problem. The paper addresses an increasingly important challenge in general-purpose agent systems. As LLM agents are increasingly deployed to handle complex, long-horizon tasks on behalf of users, inference efficiency becomes a critical bottleneck in real-world applications. Investigating how to reduce redundant context while preserving task performance is therefore a timely and practically relevant research direction.
Critical weaknesses
  1. Potential overclaiming of efficiency improvements. Although the proposed method significantly reduces token consumption, the evaluation does not sufficiently account for the impact of dynamic context management on KV-cache reuse. In modern LLM inference services, cached input tokens can be substantially cheaper than uncached tokens, sometimes by approximately an order of magnitude. Frequent modifications to tool definitions, instructions, and interaction histories may disrupt prefix caching and increase the proportion of uncached tokens. Consequently, reductions in total token consumption do not necessarily translate into proportional cost savings. While the authors report API costs for selected experiments, a more comprehensive analysis of cache hit rates and actual inference costs across benchmarks and baselines is needed to establish the practical efficiency benefits.

  2. Unclear sources of improvement. Although the paper introduces a formal framework for sufficient exposure, the proposed implementation largely combines several heuristic techniques, including tool selection, feedback-driven expansion, history compaction, and fail-open recovery. It remains unclear whether the reported improvements primarily arise from the high-level framework or from implementation-specific heuristics and prompt engineering. The paper would benefit from a more detailed description of the prompt design and tuning process to clarify the sources of performance gains. Furthermore, the theoretical analysis is somewhat conceptual, and its connection to the actual implementation and empirical findings is not sufficiently established. In particular, the assumptions underlying the theoretical results and their validity in practical agent execution deserve further discussion.

Questions for authors
  1. Cache-aware inference costs. Could the authors report the actual inference costs, including cached and uncached input tokens, for the proposed method, competing baselines, and ablation variants across all benchmarks? How does dynamic context management affect KV-cache reuse, and to what extent do the reported token reductions translate into actual cost savings?

  2. Prompt design and tuning. How were the prompts and heuristic configurations used in LeanClaw designed and optimized? Were they tuned on separate development datasets or on the same benchmarks used for evaluation? How sensitive are the reported improvements to these design choices?

2 comments

Weakness 1: Cache-aware inference costs

Thank you for highlighting the cache-cost concern.

Response: We agree that total token reduction alone does not establish an equivalent reduction in inference cost. We therefore report cached and uncached input tokens, total provider tokens, and provider-reported costs separately. Table summarizes the available cache-accounting runs. Across these runs, LeanClaw reduces both total tokens and provider cost; the cost reduction is not assumed to be proportional to the token reduction. Cache reuse also varies by benchmark: the cached-input share is low on AIME, HumanEval, MBPP, and DROP, whereas the RealClawBench run reports substantially more cached input. These results show that LeanClaw reduces both token consumption and provider-reported cost after accounting for cached and uncached input tokens, supporting its practical effectiveness.

BenchmarkMethodCached input (M)Uncached input (M)Total tokens (M)Provider cost
RealClawBench full281OpenClaw21.35424.12746.476$2.9915
RealClawBench full281LeanClaw11.24511.74023.876$1.5688
AIME-30OpenClaw0.0001.4931.838$0.2160
AIME-30LeanClaw0.0000.5220.780$0.1144
HumanEval-164OpenClaw0.01310.15310.964$1.0591
HumanEval-164LeanClaw0.0203.6724.475$0.5297
MBPP-500OpenClaw0.02028.05330.447$3.0083
MBPP-500LeanClaw0.03612.21314.413$1.6656
DROP-800OpenClaw0.01420.32120.579$1.7027
DROP-800LeanClaw0.0418.3928.734$0.7714
BenchmarkToken reductionCost reduction
--------------------------------------------------
RealClawBench full28148.63%47.56%
AIME-3057.58%47.03%
HumanEval-16459.19%49.99%
MBPP-50052.66%44.63%
DROP-80057.56%54.69%

Weakness 2: Sources of improvement

Thank you for raising the attribution issue.

Response: The MBPP component ablation provides evidence about where the measured gains arise. Full LeanClaw passes 489/500 cases using 16.84M tokens at a provider cost of $0.9700. Without the adaptive tool adapter, passes fall to 473 while usage rises to 40.64M tokens and $2.5666. This identifies the adapter as a whole as the main efficiency contributor in this experiment; it does not isolate dynamic selection from the adapter’s other rules. Ablations of history compaction, the state capsule, and deduplication show complementary effects on cost and task success. We will attribute these findings to the implemented components, rather than claim that the ablation separates the abstract framework from every heuristic choice.

LeanClaw uses a planner to propose a compact tool plan, followed by deterministic rules that retain tools needed for artifact creation, command execution, and verification. Invalid plans or planner failures trigger conservative fallback. We will release the exact prompt, rules, thresholds, and fallback conditions, and state which data were used to select the configuration, when it was fixed, and whether evaluation outcomes informed any changes. We will also report threshold sensitivity under a fixed evaluation setup.

We will clarify the theory–implementation boundary. The runtime tool inventory remains unchanged by construction. However, Proposition 1 assumes monotonic exposure, whereas the implemented controller may withdraw and later re-expose tools; we will restrict the proposition to monotonic policies.

Question 1: Cache-aware inference costs

Thank you for this question.

Response: We report provider-billed cost rather than assuming that fewer tokens imply proportionally lower cost. As detailed in our response to W1, the cache-accounted RealClawBench comparison includes planner overhead: LeanClaw reduces cached input by 47.34% and uncached input by 51.34%. Its token-level cached-input share is 48.92%, compared with 46.95% for OpenClaw. Thus, the changing context did not lower the aggregate observed cache share in this run. This aggregate measure is not a direct measurement of hardware KV-cache reuse, and we do not assume the same effect for every request or provider.

After accounting for cached and uncached tokens, total provider tokens fall by 48.63% and provider-reported cost falls by 47.56%. The additional AIME, HumanEval, MBPP, and DROP runs reported in W1 show provider-cost reductions of 47.03%, 49.99%, 44.63%, and 54.69%, respectively. These measured costs, rather than token counts alone, support the practical efficiency claim.

Question 2: Prompt design and tuning

Thank you for asking about the prompt design and tuning process.

LeanClaw’s planner uses a fixed-format prompt to propose a minimal tool set and execution budget points in JSON. It runs at temperature 0 with a 500-token output limit. Deterministic rules then retain tools needed for inspection, artifact modification, command execution, and verification; exact-copy and strict-format requirements activate conservative guards. Invalid planner output or planner failure triggers a deterministic fallback. We designed the prompt and rules from the task and tool interfaces, fixed them before the reported evaluation, and did not use the reported evaluation outcomes to modify them. We will disclose the exact prompt and configuration in the appendix.

To examine configuration sensitivity, we ran a diagnostic on the same 100 MBPP cases using Qwen3-32B, with the tool inventory, workspace, verifier, and request budget held fixed. The threshold arms changed only the tool selector’s confidence threshold; they did not vary the full LeanClaw context and state management configuration.

SettingVerifier passRuntime failTotal tokensProvider costAvg. schemas/request
Full exposure75/100246.235M$0.579138.00
Threshold 0.2568/100314.364M$0.427922.93
Threshold 0.3469/100283.807M$0.388121.67
Threshold 0.6769/100304.105M$0.431722.21

The three threshold arms achieved 68–69 verifier passes, with observed provider costs of $0.3881–$0.4317. The current deterministic selector's confidence is a normalized score of the number of matching signals, limited to 1; the default threshold is 0.25.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.