Agents powered by large language models (LLMs) have demonstrated remarkable progress in solving complex reasoning tasks. However, LLM agents often falter on long-horizon tasks due to cognitive overload, as their working memory becomes cluttered with expanding and irrelevant information, which dilutes their attention and hinders effective planning and reasoning. To mitigate this challenge, we introduce Cognitive Resource Self-Allocation (CORAL), a novel reasoning paradigm that empowers agents to proactively optimize their context. Implemented as an agent-callable working memory management toolset, CORAL allows an agent to checkpoint its task progress and verified facts, and adaptively initiate a new problem-solving episode by resetting cluttered context while preserving only the checkpointed information, enabling it to resume reasoning from a clean state. We further enhance the agent's checkpointing capabilities using a Multi-episode Agentic Reinforced Policy Optimization algorithm. On the GAIA benchmark, CORAL with an 8B model achieves 42.8% average accuracy, with particularly strong gains on the most challenging long-horizon tasks (Level 2 and Level 3). Crucially, these gains come at a substantially lower inference cost: CORAL consumes 6-7× fewer input tokens than a ReAct agent. It also generalizes to multi-hop Knowledge QA benchmarks and to the considerably harder BrowseComp, where it improves a strong proprietary agent by 8.0 points.
Figures & tables
Figure 1: Comparison of the ReAct and CORAL frameworks; both rows read left to right as the context grows. Top (ReAct). One context accumulates N ReAct blocks (thought, action, observation) above the system prompt and user task, and nothing is ever removed. Bottom (CORAL). The same blocks are interleaved with two agent-callable tools. Memory Management (MM) writes into the persistent Memory panel below the trace, holding task progress (the plan, each sub-goal pending or completed) and verified facts , so that panel evolves while the raw trace only grows. Context Optimization (CO), the vertical bar, ends the current episode : everything to its left is discarded and the next episode restarts from only the system prompt, the user task, and the current panel. A trajectory is thus a sequence of episodes (here 0–3).
Figure 2: Multi-episode ARPO. The reward is computed from a trajectory’s final episode (which contains the answer) and propagated to all preceding ones; episodes from all sampled trajectories are then pooled for group-based advantage estimation, enabling credit assignment across episode boundaries.
Model
Level 1
Level 2
Level 3
Average
Direct Inference
GPT-4o
23.1
15.4
8.3
17.5
DeepSeek-R1
43.6
26.9
8.3
31.1
Claude Sonnet 4
38.5
36.5
8.3
34.0
Agentic Inference
7–8B backbones
Table 1: Main results on GAIA (Pass@1, Avg@8). Marking convention: rows are compared within parameter-size brackets and across all three paradigms, not within paradigm blocks. The 7–8B bracket holds the four 7–8B agentic systems and the Qwen3-8B CORAL rows; the other holds everything ≥ 32B or of undisclosed proprietary size, including all Direct Inference rows and the Claude Sonnet 4 CORAL rows. Per bracket and column we boldface the best and underline the second best, so each column carries two bold entries and the best need not lie in the CORAL block.
Method
per trajectory
GAIA
In. tok.
Calls
Peak ctx.
MM
CO
ReAct
1,078K
45.3
30.6K
–
–
19.4
CORAL Prompting
314K
21.8
14.3K
20.6
4.3
20.4
CORAL SFT
153K
15.9
13.9K
3.9
0.21
41.6
CORAL RL
136K
15.2
12.7K
4.1
0.21
42.8
Table 2: Inference cost and working-memory tool usage on GAIA, over all 824 evaluation trajectories (103 questions × 8 samples) with Qwen3-8B. Columns report per-trajectory averages of input tokens, LLM calls, the longest context the model is ever conditioned on (“peak ctx.”), and MM and CO invocations. CORAL RL uses 87.4% fewer input tokens than ReAct while being more than twice as accurate.
Method
NQ
HotpotQA
2Wiki.
Musique
Bamboogle
Search-o1
55.1
42.4
37.7
19.7
53.6
R1-Searcher
52.3
53.1
65.8
25.6
65.6
DeepResearcher
61.9
64.3
66.6
29.3
72.8
SimpleDeepSearcher
-
-
79.8
29.4
76.8
CORAL
71.0
70.4
79.2
43.2
79.2
Table 3: Results on Knowledge QA benchmarks. We report accuracy (%) on multi-hop QA tasks.
SFT training set
#Conv.
L1
L2
L3
Avg
Full (web + math)
3,682
47.1
43.5
15.6
41.6
w/o math
3,441
47.1
40.4
14.6
39.9
w/o incorrect
2,030
49.7
37.5
13.5
39.3
random subsample
2,030
42.0
36.8
17.7
36.5
Table 4: Ablations on GAIA (Pass@1, Avg@8), all with Qwen3-8B and SFT only. #Conv. counts SFT conversations after episode splitting; 3,173 raw trajectories yield 3,682 because each CO invocation contributes one extra. Each variant is a filtered subset of one pool, not a fresh sampling run; “random subsample” is a volume-matched control drawn uniformly from the full pool, which isolates data quality from data volume.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
Value
Number of epochs
3
Learning rate
1e-5
Per-device batch size
4
Gradient accumulation steps
2
Effective batch size
64
Warmup ratio
0.05
Appendix
Table 5: Hyperparameters for Supervised Fine-Tuning.
Hyperparameter
Value
Actor learning rate
1e-6
Train batch size
64
Mini-batch size
16
Samples per prompt ( n )
8
Clip ratio (low)
0.2
Clip ratio (high)
0.28
Appendix
Table 6: Hyperparameters for Reinforcement Learning.
Model
L1
L2
L3
Avg
Qwen3-8B + SFT
Pass@1 (Avg@8)
47.1 ± 4.1
43.5 ± 4.5
15.6 ± 9.4
41.6 ± 3.5
Best Pass@1
53.8
51.9
33.3
47.6
Worst Pass@1
41.0
38.5
8.3
36.9
Maj@8
51.3
50.0
16.7
46.6
Pass@8
74.4
78.9
33.3
71.8
Appendix
Table 7: Detailed performance statistics on GAIA (8 runs). We report Mean ± Std for Pass@1, along with Best Pass@1, Worst Pass@1, Maj@8, and Pass@8.
Configuration
Outcome
MM / traj.
CO / traj.
Prompting-only
Correct
20.11
2.05
Incorrect
20.69
4.80
Overall
20.58
4.29
SFT
Correct
3.37
0.12
Incorrect
4.44
0.29
Overall
3.93
0.21
Appendix
Table 8: MM and CO invocations per trajectory on GAIA, split by outcome. Across all three configurations, trajectories that fail invoke CO roughly twice as often as trajectories that succeed.
Backbone
Benchmark
ReAct
+ CORAL
Δ
Qwen2.5-7B-Instruct
GAIA
17.5
13.6
− 3.9
Qwen3-8B
GAIA
19.4
20.4
+ 1.0
QwQ-32B
GAIA
26.2
32.0
+ 5.8
Qwen3-32B
GAIA
34.0
36.3
+ 2.3
Claude Sonnet 4
GAIA
60.2
65.0
+ 4.8
Claude Sonnet 4
BrowseComp †
22.7
30.7
+ 8.0
Appendix
Table 9: CORAL used purely as a prompting-time wrapper, with no training of any kind, across five backbones. The benefit grows with the capability of the backbone and is largest on the benchmark that stresses long-horizon browsing hardest. † The first 150 BrowseComp questions; both systems see exactly the same questions and the same web search and browse tools, and differ only in whether the MM and CO tools are available.
#
MM checkpoint
Verified fact recorded
1
Task decomposition
Objective and sub-task plan
2
Strike identified
Newsboys’ strike of 1899, New York
3
Company identified
Bumble Bee Seafoods (founded 1897); moved back to downtown San Diego in 2014
4
Nu metal band
P.O.D. (“Payable on Death”), formed in San Diego, 1992
Joanna Davidovich; blog post of 10 June 2012 ( =1992+20 ) mentioning the song
Appendix
Table 10: The seven Memory Management calls CORAL issued while solving BrowseComp Question #6, in order. Each fact was checkpointed at the moment it was confirmed, which let the agent advance to the next hop without carrying forward the search results that had produced the previous one.
National Key Laboratory of Cognition and Decision Intelligence for Complex Systems, Institute of Automation, Chinese Academy of Sciences · University of Chinese Academy of Sciences · Nanjing Artificial Intelligence Research of IA