Papers
Topics
Authors
Recent
Search
2000 character limit reached

Budget-Aware Context Management (BACM)

Updated 4 July 2026
  • Budget-Aware Context Management is a framework that allocates token, tool-call, and memory budgets to selectively retain useful context for long-horizon tasks.
  • It employs techniques such as knapsack-constrained selection, sequential decision processes, and explicit budget signals to optimize resource use.
  • Empirical studies show that BACM enhances performance by balancing information retention and computational costs, offering significant gains over brute-force methods.

Searching arXiv for the cited BACM-related papers and closely related work to ground the article. {"6query6 Context Management OR ti:\6"ContextBudget\" OR ti:\6"Spend Less, Reason Better\"6 OR ti:\6"PACMS\" OR ti:\6"BudgetThinker\" OR ti:\6"Budget-Aware Tool-Use Enables Effective Agent Scaling\"","max_results":6all:Budget-Aware Context Management OR ti:\6query6,"sort_by":"submittedDate","sort_order":"descending"} Budget-Aware Context Management (BACM) denotes a family of methods for managing prompt assembly, interaction history, retrieval outputs, tool traces, and reasoning under explicit resource limits such as token budgets, tool-call budgets, memory ceilings, latency targets, and monetary cost. In current work, BACM appears as a budget-constrained sequential decision process for long-horizon agents, a knapsack-constrained 6query6 context-selection problem, a budget-aware tree search over reasoning and tool trajectories, and an explicit budget-signaling scheme for generation control (&&&6query6&&&, &&&6all:Budget-Aware Context Management OR ti:\6&&&, &&&6 OR ti:\6&&&, &&&6 OR ti:\6&&&). Across these formulations, the common premise is that budget should be an active control signal rather than a passive accounting artifact, and that context should be managed before overflow or waste occurs.

6all:Budget-Aware Context Management OR ti:\6. Problem formulation and scope

BACM arises because LLM agents accumulate context from several directions simultaneously: user and assistant turns, persistent memory, retrieved passages, tool outputs, intermediate reasoning, and environment observations. Once the cumulative context exceeds the model’s token budget, the system must decide what to keep, what to compress, what to evict, and when to stop gathering more evidence (&&&6all:Budget-Aware Context Management OR ti:\6&&&). In long-horizon settings, this induces a trade-off between retaining past information and staying within a constrained context window imposed by memory footprint, inference latency, and serving cost (&&&6query6&&&).

Several works formalize this resource state explicitly. In ContextBudget, the budget-conditioned state is

PRESERVED_PLACEHOLDER_6query6^

where PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6^ is the current reasoning state, PRESERVED_PLACEHOLDER_6 OR ti:\6^ is the fixed budget, PRESERVED_PLACEHOLDER_6 OR ti:\6^ is the current context length, and PRESERVED_PLACEHOLDER_6 OR ti:\6^ is the token length of the pending observation (&&&6query6&&&). In Budget-Aware Value Tree search, the agent instead tracks a dynamic state

PRESERVED_PLACEHOLDER_6 OR ti:\6^

with component-wise updates

bt+1=btC(at),b_{t+1} = b_t - C(a_t),

so that tool calls and token generation are budgeted jointly at inference time (&&&6 OR ti:\6&&&). BAGEN generalizes this perspective by distinguishing internal budgets from agent computation and external budgets from agent actions, and defines budget-awareness as progressive interval estimation over remaining requirement rather than remaining capacity alone (Lin et al., 29 May 2026).

A minimal unifying view is that BACM governs an evolving set of context units under a hard or soft constraint. In some systems the units are retrieved passages or turns; in others they are reasoning-tree nodes, commit blocks, typed episodes, or labeled examples in a stream. This suggests that BACM is not a single algorithm but a systems-level discipline for constrained information retention and acquisition.

6 OR ti:\6. Canonical mathematical formulations

Current BACM work uses several recurrent optimization templates.

Formulation Core objective or constraint Representative systems
Sequential decision process Maintain context under a fixed budget before appending new observations ContextBudget, CAT
Knapsack-constrained selection Maximize utility of selected context under token cost PACMS, Budget-Aware Routing
Budget-aware search Allocate tool and token budget across reasoning branches BAVT, BATS
Bounded online memory Update retained context under fixed memory bound CURE, CWL

In 6query6 prompt assembly, PACMS casts BACM as knapsack-constrained submodular maximization over pooled candidates. Let C={c1,,cn}C=\{c_1,\dots,c_n\} be the pooled candidate set, qq the current 6query6 BB the token budget, and PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6query6^ an optional mandatory subset. With embeddings PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6all:Budget-Aware Context Management OR ti:\6^ for candidate PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6 OR ti:\6^ and PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6 OR ti:\6^ for the 6query6 PACMS defines

PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6 OR ti:\6^

PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\6 OR ti:\6^

and the facility-location coverage objective

PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\66^

subject to PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\67 and PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\68 (&&&6all:Budget-Aware Context Management OR ti:\6&&&). Budget-Aware Routing for long clinical text uses the same knapsack pattern, but with a monotone submodular objective

PRESERVED_PLACEHOLDER_6all:Budget-Aware Context Management OR ti:\69

balancing relevance, facility-location coverage, and log-determinant diversity under a token budget (&&&6all:Budget-Aware Context Management OR ti:\6query6&&&).

In long-horizon agent control, ContextBudget formalizes BACM as a sequential decision problem in which the policy chooses a refinement action PRESERVED_PLACEHOLDER_6 OR ti:\6query6^ before loading the pending observation so that the updated context PRESERVED_PLACEHOLDER_6 OR ti:\6all:Budget-Aware Context Management OR ti:\6^ satisfies PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6, after which

PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^

Reward is task performance gated by budget feasibility at every turn: if any turn violates the stage-specific budget, the rollout reward is set to zero (&&&6query6&&&).

In budget-aware reasoning and tool use, BAVT models inference as search over a dynamic tree with values PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ on nodes and a remaining-resource ratio

PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^

so that candidate-node selection probability is derived from PRESERVED_PLACEHOLDER_6 OR ti:\66^ (&&&6 OR ti:\6&&&). Budget-aware tool-use work adds a unified cash-denominated cost

PRESERVED_PLACEHOLDER_6 OR ti:\67

combining priced tokens and tool calls, and uses explicit per-tool budgets as hard constraints (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&).

These formulations differ in granularity, but each treats context management as constrained optimization over informational utility.

6 OR ti:\6. Mechanism families

A major BACM family uses 6query6 selection over a pooled candidate set. PACMS selects uniformly over heterogeneous pooled candidates—conversation turns, persistent memory entries, and tool outputs—rather than using silo-specific heuristics such as “keep last PRESERVED_PLACEHOLDER_6 OR ti:\68 turns” plus “top-PRESERVED_PLACEHOLDER_6 OR ti:\69 memories.” Its assemble() procedure is implemented with CELF lazy-greedy, using marginal gain

PRESERVED_PLACEHOLDER_6 OR ti:\6query6^

and the density criterion PRESERVED_PLACEHOLDER_6 OR ti:\6all:Budget-Aware Context Management OR ti:\6^ under the knapsack budget (&&&6all:Budget-Aware Context Management OR ti:\6&&&). Budget-Aware Routing reaches a similar end by selecting document units produced by sentence-, section-, window-, or cluster-based unitization, then routing among Lead, MMR, and RCD according to budget regime and document statistics (&&&6all:Budget-Aware Context Management OR ti:\6query6&&&).

A second family uses budget-aware compression or aggregation before context overflow. ContextBudget segments the context buffer into commit blocks and lets the policy choose Null, Partial, or Full aggregation before appending the next observation, with deferred loading exposing PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ before the compression decision (&&&6query6&&&). CAT restructures the working context as

PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^

where PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ is stable task semantics, PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ condensed long-term memory, and PRESERVED_PLACEHOLDER_6 OR ti:\66^ the most recent PRESERVED_PLACEHOLDER_6 OR ti:\67 high-fidelity interactions; the agent can select a “context” action to proactively rewrite the historical segment into a structured memory block (&&&6all:Budget-Aware Context Management OR ti:\67&&&).

A third family replaces summarization with structured eviction. CWL maintains a typed DAG of exploratory and action episodes, preserves user turns and active exploratory context, and evicts “oldest-and-most-recoverable” content when the token budget is exceeded. Its evictability predicate makes closed action episodes immediately eligible, while exploratory episodes become evictable only after all dependent actions are fully evicted (&&&6all:Budget-Aware Context Management OR ti:\68&&&). This yields a deterministic, LLM-free eviction policy rather than a rewrite-based compaction policy.

A fourth family makes budget-awareness explicit during reasoning. BudgetThinker inserts a fixed set of special control tokens PRESERVED_PLACEHOLDER_6 OR ti:\68 at ratio-based positions PRESERVED_PLACEHOLDER_6 OR ti:\69 so the model is periodically informed of remaining reasoning budget; at budget exhaustion, the decoding engine appends a final-answer trigger and allocates an additional 6 OR ti:\6query6^ tokens solely for the final answer (&&&6 OR ti:\6&&&). Budget Tracker uses a prompt-level budget-status block after each tool response, while BATS adds budget-aware planning, self-verification, and a dig-deeper versus pivot decision based on remaining resources (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&).

A fifth family performs step-level valuation and pruning. BAVT uses a residual critic that predicts an information delta PRESERVED_PLACEHOLDER_6 OR ti:\6query6^ and updates child values via

PRESERVED_PLACEHOLDER_6 OR ti:\6all:Budget-Aware Context Management OR ti:\6^

with PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ clipped and a terminal threshold PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ for “Answer now.” Negative or zero PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ induces “Widen,” positive but sub-threshold PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ induces “Deepen,” and backstop answering is triggered when the tool budget is exhausted or the token ratio falls below PRESERVED_PLACEHOLDER_6 OR ti:\66^ (&&&6 OR ti:\6&&&). In tabular stream learning, CURE applies an analogous bounded-memory policy using a short recency bank, an entropy-gated long bank, and same-class redundancy-aware eviction under

PRESERVED_PLACEHOLDER_6 OR ti:\67

(&&&6 OR ti:\6 OR ti:\6&&&).

6 OR ti:\6. Empirical performance across domains

The empirical record shows that budget-awareness can dominate brute-force budget scaling, but the strength of this effect depends on task structure and budget regime.

System Setting Reported result
BAVT Multi-hop QA, low budget Low tier achieves EM = 6query6.6 OR ti:\6 OR ti:\68, surpassing baseline High tier EM = 6query6.6 OR ti:\6 OR ti:\6 OR ti:\6^ at PRESERVED_PLACEHOLDER_6 OR ti:\68 tool calls (&&&6 OR ti:\6&&&)
ContextBudget 6 OR ti:\6 OR ti:\6-objective QA, 6 OR ti:\6k budget 6all:Budget-Aware Context Management OR ti:\6.7× cumulative F6all:Budget-Aware Context Management OR ti:\6^ improvement over the best baseline (6 OR ti:\6.6query66^ vs. 6all:Budget-Aware Context Management OR ti:\6.6 OR ti:\6all:Budget-Aware Context Management OR ti:\6) (&&&6query6&&&)
PACMS LongMemEval QA, 6 OR ti:\6 OR ti:\6% budget 6 OR ti:\6 OR ti:\6.6query6^ and 68.6query6^ QA accuracy, vs top-k 6 OR ti:\6query6.6query6^ and 66 OR ti:\6.6query6, lc-mmr 6 OR ti:\6 OR ti:\6.6query6^ and 6 OR ti:\66.6query6^ (&&&6all:Budget-Aware Context Management OR ti:\6&&&)
CWL Long-horizon agents 89 sequential tasks across 86query6^ million tokens with no measurable degradation in task accuracy relative to per-task isolated sessions (&&&6all:Budget-Aware Context Management OR ti:\68&&&)
SWE-Compressor SWE-Bench-Verified 6 OR ti:\67.6% solved rate (&&&6all:Budget-Aware Context Management OR ti:\67&&&)
Budget Tracker / BATS BrowseComp with Gemini-6 OR ti:\6.6 OR ti:\6-Pro ReAct 6all:Budget-Aware Context Management OR ti:\6 OR ti:\6.6 vs BATS 6 OR ti:\6 OR ti:\6.6 at budget 6all:Budget-Aware Context Management OR ti:\6query6query6^ per tool (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&)
CURE Tabular stream learning Up to 6 OR ti:\67.6query6% relative improvement over classical stream learners (&&&6 OR ti:\6 OR ti:\6&&&)

In long-horizon search agents, BACM-RL in ContextBudget consistently outperforms ReAct, Search-R6all:Budget-Aware Context Management OR ti:\6, Summary Agent, and MEM6all:Budget-Aware Context Management OR ti:\6^ across model scales and task complexities. For Qwen6 OR ti:\6-6 OR ti:\6query6B-A6 OR ti:\6B-Instruct on multi-objective QA, BACM-RL reaches 6all:Budget-Aware Context Management OR ti:\6.6query6 OR ti:\6 OR ti:\6, 6 OR ti:\6.6 OR ti:\687, 6.6 OR ti:\6 OR ti:\6 OR ti:\6, and 6 OR ti:\6.6 OR ti:\6 OR ti:\6 OR ti:\6^ on 6 OR ti:\6-, 8-, 6all:Budget-Aware Context Management OR ti:\66-, and 6 OR ti:\6 OR ti:\6-objective settings, while the high-complexity 6 OR ti:\6 OR ti:\6-objective regime shows 6 OR ti:\6.6 OR ti:\6 OR ti:\6 OR ti:\6^ versus Summary’s 6 OR ti:\6.86 OR ti:\68, described as over 6all:Budget-Aware Context Management OR ti:\6.6× gains (&&&6query6&&&).

In prompt assembly, PACMS provides a stronger distinction between recall and downstream utility. On a 6all:Budget-Aware Context Management OR ti:\6query6query6-question LongMemEval sample, it trails top-k on evidence-round recall at one operating point, yet still leads on end-to-end QA; PACMS also outperforms lc-mmr on QA despite comparable recall at the same budget. The reported interpretation is that facility-location coverage produces more extractable prompts than pairwise diversification or pure relevance ranking (&&&6all:Budget-Aware Context Management OR ti:\6&&&).

In reasoning-tree control, BAVT’s budget-conditioned search and residual value pruning are both necessary. The middle-tier ablation reports average EM of approximately 6query6.6 OR ti:\668 for the parallel baseline, approximately 6query6.6 OR ti:\6all:Budget-Aware Context Management OR ti:\6 OR ti:\6^ for tree-only random selection, approximately 6query6.6 OR ti:\6query69 for tree plus step-level value, and 6query6.6 OR ti:\688 for full BAVT (&&&6 OR ti:\6&&&).

In tool-augmented search, larger raw tool budgets do not automatically improve performance. ReAct saturates around budget 6all:Budget-Aware Context Management OR ti:\6query6query6, whereas Budget Tracker continues to improve, and BATS produces markedly better scaling curves. Under budget 6all:Budget-Aware Context Management OR ti:\6query6query6^ per tool, BrowseComp results for Gemini-6 OR ti:\6.6 OR ti:\6-Pro move from 6all:Budget-Aware Context Management OR ti:\6 OR ti:\6.6 with ReAct to 6 OR ti:\6 OR ti:\6.6 with BATS; BrowseComp-ZH moves from 6 OR ti:\6all:Budget-Aware Context Management OR ti:\6.6 OR ti:\6^ to 6 OR ti:\66.6query6; HLE-Search moves from 6 OR ti:\6query6.6 OR ti:\6^ to 6 OR ti:\67.6query6^ (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&).

In non-agentic online settings, bounded-context policies show the same structural benefit. CURE ranks first on all seven streams with average rank 6all:Budget-Aware Context Management OR ti:\6.6query6query6, and its per-step runtime remains practical: total 6query6.6query6 OR ti:\6sort_by6 OR ti:\6s for CURE versus 6query6.6query6 OR ti:\6 OR ti:\69s for DualFIFO, with prediction dominating update overhead (&&&6 OR ti:\6 OR ti:\6&&&).

6 OR ti:\6. Misconceptions, contrasts, and design trade-offs

A common misconception is that BACM is equivalent to recency truncation. PACMS explicitly argues that recency truncation is topic-blind, discarding early-but-relevant facts and retaining recent-but-irrelevant material, especially in long-horizon memory tasks (&&&6all:Budget-Aware Context Management OR ti:\6&&&). CWL makes a related point from a systems angle: semantic awareness requires dropping the oldest-and-most-recoverable content according to dependency structure rather than oldest-in-time regardless of relevance (&&&6all:Budget-Aware Context Management OR ti:\68&&&).

A second misconception is that BACM is simply summarization. Several approaches rely on summarization or aggregation, but they do so for different reasons and with different failure modes. CAT turns context management into a callable tool that produces structured long-term memory blocks at subtask boundaries and strategy switches (&&&6all:Budget-Aware Context Management OR ti:\67&&&). ContextBudget uses commit-block aggregation learned by reinforcement learning (&&&6query6&&&). CWL, by contrast, is presented as “Beyond Compaction”: it avoids unpredictable lossiness, destruction of causal structure, blocking model cost, and compression-induced hallucination by using a deterministic, LLM-free eviction policy (&&&6all:Budget-Aware Context Management OR ti:\68&&&).

A third misconception is that more computation automatically implies better performance. BAVT’s central comparison is that low-budget intelligent search can beat higher-budget brute-force scaling (&&&6 OR ti:\6&&&). Budget-aware tool-use work reports that simply granting larger tool-call budgets fails to improve performance because agents lack budget awareness and quickly hit a performance ceiling (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&). BAGEN sharpens this further by showing that strong agents do not necessarily have strong budget-awareness, with correlation PRESERVED_PLACEHOLDER_6 OR ti:\69, and that frontier models are consistently over-optimistic and continue spending on tasks that are unlikely to succeed (Lin et al., 29 May 2026).

A fourth misconception is that BACM concerns only the input context window. BudgetThinker addresses output-side reasoning length under a fixed input context and therefore occupies a narrower scope than full BACM (&&&6 OR ti:\6&&&). Conversely, BAGEN and budget-aware tool-use make clear that context, reasoning, and action budgets interact; in practice, BACM often spans prompt tokens, chain-of-thought verbosity, retrieval depth, and tool orchestration simultaneously (Lin et al., 29 May 2026, &&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&).

These contrasts imply real design trade-offs: training-free versus trained control, summarization versus structured eviction, 6query6 set selection versus sequential compression, and token-only versus multi-resource budgeting.

6. Implementation patterns, limitations, and open directions

Several implementation patterns recur across the literature. Systems track budget explicitly at each step, expose remaining capacity to the model or controller, and enforce a fallback policy near exhaustion. BAVT uses a forced-answer backstop when no answer exists and either PRESERVED_PLACEHOLDER_6 OR ti:\6query6^ or PRESERVED_PLACEHOLDER_6 OR ti:\6all:Budget-Aware Context Management OR ti:\6^ (&&&6 OR ti:\6&&&). ContextBudget exposes current context length, pending observation length, remaining budget, and a safety-margined usable limit in a budget-state prompt, with a 6all:Budget-Aware Context Management OR ti:\6,6query6query6query6-token safety margin subtracted from max model length (&&&6query6&&&). Budget Tracker appends a <budget> status block after each tool response, while BATS periodically removes old tool responses and replaces them with verifier summaries, with summarization every PRESERVED_PLACEHOLDER_6 OR ti:\6 OR ti:\6^ steps in the reported implementation (&&&6all:Budget-Aware Context Management OR ti:\6 OR ti:\6&&&).

Selection and retention policies also share common engineering choices. PACMS keeps a warm embedding cache across turns and delegates compaction to the host runtime because ownsCompaction=false (&&&6all:Budget-Aware Context Management OR ti:\6&&&). Budget-Aware Routing recommends sentence- or section-level units as defaults, greedy value-per-cost selection, and metric choice aligned with downstream use: ROUGE for extractive settings and BERTScore for abstractive generation (&&&6all:Budget-Aware Context Management OR ti:\6query6&&&). CURE stores normalized predictive entropy at prediction time and uses it later for admission decisions, while eviction is performed within the most represented class using same-class nearest-neighbor structure and a recent centroid tie-break (&&&6 OR ti:\6 OR ti:\6&&&).

The limitations are correspondingly diverse. BAVT incurs critic overhead, assumes uniform tool cost in its experiments, and focuses on multi-hop QA rather than irreversible or partially observable environments (&&&6 OR ti:\6&&&). ContextBudget identifies sparse and delayed rewards, coarse segment-level aggregation, and broader generalization to open-ended tool use, multimodal reasoning, and human-agent interaction as open issues (&&&6query6&&&). PACMS notes that under very tight budgets, pure relevance can outperform coverage-driven selection, and that aggressive redundancy penalties may occasionally drop necessary detail (&&&6all:Budget-Aware Context Management OR ti:\6&&&). BAGEN shows that interval calibration remains challenging, with interval coverage capping at 6 OR ti:\67% after SFT+RL, and that cross-task transfer retains only 6all:Budget-Aware Context Management OR ti:\67–6 OR ti:\66% of in-task reward (Lin et al., 29 May 2026). CWL depends on correct episode typing and dependency annotation, and tighter ceilings can preserve accuracy while increasing wall-clock time through re-exploration (&&&6all:Budget-Aware Context Management OR ti:\68&&&).

Open directions follow directly from these failure modes. The literature repeatedly points toward multi-dimensional cost vectors for heterogeneous tools, stronger or learned relevance estimators, more precise credit assignment for compression actions, finer-grained saliency beyond segment-level aggregation, adaptive joint management of input-context and output-reasoning budgets, and on-policy evaluation in live interactive deployments (&&&6 OR ti:\6&&&, &&&6all:Budget-Aware Context Management OR ti:\6&&&, &&&6 OR ti:\6&&&). A plausible implication is that future BACM systems will increasingly combine explicit budget signals, structured memory operations, and principled utility estimation, rather than relying on a single compression or truncation heuristic.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Budget-Aware Context Management (BACM).