ContextPilot extends context management with planning, structured memory, and soft context offloading. Its context-aware partial rollout focuses exploration on sensitive context-editing decisions, while fine-grained credit assignment trains intermediate snapshots using the outcomes of their downstream branches. Experiments on long-context QA and deep search tasks show that ContextPilot achieves stronger performance with a more compact working context, outperforming existing baselines across various base models and benchmarks.</p>\n","updatedAt":"2026-08-31T01:49:52.509Z","author":{"_id":"64ddbc3f1f2dad27e1a05ac1","avatarUrl":"/avatars/4fb2753b7998c8536bfd4780d3b10a6d.svg","fullname":"Junrulu","name":"Junrulu","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":15,"isUserFollowing":false,"primaryOrg":{"avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/5dd96eb166059660ed1ee413/Lp3m-XLpjQGwBItlvn69q.png","fullname":"Tencent","name":"tencent","type":"org","isHf":false,"plan":"team"}}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.8410558700561523},"editors":["Junrulu"],"editorAvatarUrls":["/avatars/4fb2753b7998c8536bfd4780d3b10a6d.svg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2608.28476","authors":[{"_id":"6a94da5e073195fee51571d8","name":"Zhuoshi Pan","hidden":false},{"_id":"6a94da5e073195fee51571d9","name":"Qizhi Pei","hidden":false},{"_id":"6a94da5e073195fee51571da","name":"Junru Lu","hidden":false},{"_id":"6a94da5e073195fee51571db","name":"Honglin Lin","hidden":false},{"_id":"6a94da5e073195fee51571dc","name":"H. Vicky Zhao","hidden":false},{"_id":"6a94da5e073195fee51571dd","name":"Di Yin","hidden":false},{"_id":"6a94da5e073195fee51571de","name":"Xing Sun","hidden":false}],"publishedAt":"2026-08-28T00:00:00.000Z","submittedOnDailyAt":"2026-08-31T00:00:00.000Z","title":"ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL","submittedOnDailyBy":{"_id":"64ddbc3f1f2dad27e1a05ac1","avatarUrl":"/avatars/4fb2753b7998c8536bfd4780d3b10a6d.svg","isPro":false,"fullname":"Junrulu","user":"Junrulu","type":"user","name":"Junrulu"},"summary":"Long-horizon agentic tasks require large language models (LLMs) to iteratively retrieve, integrate, and maintain dispersed information across multi-turn interactions, but preserving all interaction histories leads to a continuously growing working context. Recent proactive context management methods allow models to edit their own working context with specialized tools, yet they still face three key limitations: (1) a limited toolset restricted to search, deletion, and summarization, with no support for global planning, long-term memory, and adaptive compression; (2) inefficient exploration that treats context management actions uniformly despite their heterogeneous impacts on final outcomes; and (3) coarse-grained credit assignment that assigns the final trajectory-level reward to all intermediate context editing actions during RL. To bridge these gaps, we introduce ContextPilot, a proactive context management framework for long-horizon agentic reasoning. Our approach systematically augments the toolset with planning, long-term memory, and soft context offloading tools. We further propose an RL method tailored for context management, which uses context and entropy variation to identify critical editing decisions for branch sampling and estimates action-level advantages from all branched trajectories that pass through the corresponding context editing action. Experiments on long-context QA and deep search tasks show that ContextPilot achieves stronger performance with a more compact working context, consistently outperforming existing baselines across various base models and benchmarks. Code is available at https://github.com/Tencent/ContextPilot.","upvotes":21,"discussionId":"6a94da5f073195fee51571df","projectPage":"https://tencent.github.io/ContextPilot","githubRepo":"https://github.com/Tencent/ContextPilot","githubRepoAddedBy":"user","ai_summary":"ContextPilot improves long-horizon agent reasoning by expanding context-editing tools and using reinforcement learning with branch sampling to identify critical context decisions.","ai_keywords":["proactive context management","long-horizon agentic reasoning","context editing tools","planning","long-term memory","soft context offloading","reinforcement learning","branch sampling","action-level advantages","entropy variation"],"ai_summary_model":"thinkingmachines/Inkling-Small","githubStars":2,"organization":{"_id":"66543b6e420092799d2f625c","name":"tencent","fullname":"Tencent","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/5dd96eb166059660ed1ee413/Lp3m-XLpjQGwBItlvn69q.png"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"64ddbc3f1f2dad27e1a05ac1","avatarUrl":"/avatars/4fb2753b7998c8536bfd4780d3b10a6d.svg","isPro":false,"fullname":"Junrulu","user":"Junrulu","type":"user"},{"_id":"6565e44b9bf6665f10016213","avatarUrl":"/avatars/0d7cf0e1b42cd116960cd030478446c5.svg","isPro":false,"fullname":"Zhuoshi Pan","user":"panzs19","type":"user"},{"_id":"640d99628512ec51d7ef71c7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/640d99628512ec51d7ef71c7/fcBkqnxfxuuuZTqfN_BGy.jpeg","isPro":false,"fullname":"Honglin Lin","user":"LHL3341","type":"user"},{"_id":"6397f6081323f19c578f142e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/6397f6081323f19c578f142e/it7FYYKjlLX8wSsMLm8EO.jpeg","isPro":false,"fullname":"QizhiPei","user":"QizhiPei","type":"user"},{"_id":"63ac5701c21e60a3e9b58aa7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/63ac5701c21e60a3e9b58aa7/g6EX7diOpuA94R2ab-rZC.png","isPro":true,"fullname":"Dipankar Sarkar","user":"dipankarsarkar","type":"user"},{"_id":"6363ad21287b5ce02ed187ae","avatarUrl":"/avatars/9903cddc7330852fc6d8cf672cebcb56.svg","isPro":false,"fullname":"SiyuAn","user":"moonlake","type":"user"},{"_id":"654c4f6d848e8c8b118e16e3","avatarUrl":"/avatars/b2323e95624e28c2578a3c5d73020c77.svg","isPro":false,"fullname":"Arnold Yang","user":"B3rrYang","type":"user"},{"_id":"63fc75f9b9db84750cea9c5c","avatarUrl":"/avatars/2c5bf9685e0cfc4b5785a4a86c34e0db.svg","isPro":false,"fullname":"DI YIN","user":"DIYIN","type":"user"},{"_id":"68761ea2602bdfd2d12940a6","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/MDJ4KnwufjX8_8CkZSOdW.png","isPro":false,"fullname":"richard_dxx","user":"dxxth0356","type":"user"},{"_id":"6a94ef826d49926c37ccaecf","avatarUrl":"/avatars/5d09fe269167b4eec6a36952672b47a0.svg","isPro":false,"fullname":"Ji Qi","user":"SingularityUndefined","type":"user"},{"_id":"61c93839af1a6e3b53ca6dbc","avatarUrl":"/avatars/7a68ff9d7fc0c2f83aaf5b541d90d9a8.svg","isPro":false,"fullname":"zefengdu","user":"seeledu","type":"user"},{"_id":"6a73dd247197e796b1b421d9","avatarUrl":"/avatars/5e7667ffaae4c007470c60c49d26ade1.svg","isPro":false,"fullname":"洪明","user":"sjalngh","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":0,"organization":{"_id":"66543b6e420092799d2f625c","name":"tencent","fullname":"Tencent","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/5dd96eb166059660ed1ee413/Lp3m-XLpjQGwBItlvn69q.png"},"query":{}}">
ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL
Abstract
ContextPilot improves long-horizon agent reasoning by expanding context-editing tools and using reinforcement learning with branch sampling to identify critical context decisions.
Long-horizon agentic tasks require large language models (LLMs) to iteratively retrieve, integrate, and maintain dispersed information across multi-turn interactions, but preserving all interaction histories leads to a continuously growing working context. Recent proactive context management methods allow models to edit their own working context with specialized tools, yet they still face three key limitations: (1) a limited toolset restricted to search, deletion, and summarization, with no support for global planning, long-term memory, and adaptive compression; (2) inefficient exploration that treats context management actions uniformly despite their heterogeneous impacts on final outcomes; and (3) coarse-grained credit assignment that assigns the final trajectory-level reward to all intermediate context editing actions during RL. To bridge these gaps, we introduce ContextPilot, a proactive context management framework for long-horizon agentic reasoning. Our approach systematically augments the toolset with planning, long-term memory, and soft context offloading tools. We further propose an RL method tailored for context management, which uses context and entropy variation to identify critical editing decisions for branch sampling and estimates action-level advantages from all branched trajectories that pass through the corresponding context editing action. Experiments on long-context QA and deep search tasks show that ContextPilot achieves stronger performance with a more compact working context, consistently outperforming existing baselines across various base models and benchmarks. Code is available at https://github.com/Tencent/ContextPilot.
Community
ContextPilot extends context management with planning, structured memory, and soft context offloading. Its context-aware partial rollout focuses exploration on sensitive context-editing decisions, while fine-grained credit assignment trains intermediate snapshots using the outcomes of their downstream branches. Experiments on long-context QA and deep search tasks show that ContextPilot achieves stronger performance with a more compact working context, outperforming existing baselines across various base models and benchmarks.
Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images
Cite arxiv.org/abs/2608.28476 in a dataset README.md to link it from this page.
Cite arxiv.org/abs/2608.28476 in a Space README.md to link it from this page.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.