<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Toni on Medium]]></title>
        <description><![CDATA[Stories by Toni on Medium]]></description>
        <link>https://medium.com/@toni3095?source=rss-8a151e24453------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Toni on Medium</title>
            <link>https://medium.com/@toni3095?source=rss-8a151e24453------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:00:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@toni3095/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My robotic plans for Q4]]></title>
            <link>https://medium.com/@toni3095/my-robotic-plans-for-q4-0ed669afdb60?source=rss-8a151e24453------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ed669afdb60</guid>
            <category><![CDATA[hms]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Toni]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 20:18:57 GMT</pubDate>
            <atom:updated>2026-09-01T20:27:48.256Z</atom:updated>
            <content:encoded><![CDATA[<p>AI labs are creating models to control robots.</p><p>Just to name a couple:</p><ul><li>Google recently dropped <a href="https://deepmind.google/models/gemini-robotics">Gemini Robotics</a> 2, a foundation model for robotics.</li><li>And Anthropic is previewing the <a href="https://www.anthropic.com/news/model-hardware-standard-research-preview">Model Hardware Standard</a>, kind of the MCP of robotics.</li></ul><p>Myself, I have been pretty obsessed with robotics for a year or so.</p><p>For example, doing teleoperation…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWSUHKbVOc28%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWSUHKbVOc28&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWSUHKbVOc28%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b3f3c70c830b09f8965ef469eae29f8/href">https://medium.com/media/7b3f3c70c830b09f8965ef469eae29f8/href</a></iframe><p>… Running an ACT policy in the same robotic arm…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpQ6EPwbY38s%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpQ6EPwbY38s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpQ6EPwbY38s%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/afff906787c940d2da2aff664d90cbd2/href">https://medium.com/media/afff906787c940d2da2aff664d90cbd2/href</a></iframe><p>… Or even chatting with a cute robot:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxwcZvyHIkDk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FxwcZvyHIkDk%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxwcZvyHIkDk%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/66a5ad1bf6784e67222ce0ad317c1ebd/href">https://medium.com/media/66a5ad1bf6784e67222ce0ad317c1ebd/href</a></iframe><p>so, what do I want to do now?</p><h3><strong>What do I want?</strong></h3><p>Compare how well my arm performs with:</p><ul><li>An ACT model trained on my pick-and-place dataset.</li><li>A general-purpose robotics model such as Gemini Robotics 2.</li><li>A standard LLM with an MHS.</li></ul><p>Across episodes that are progressively more different from the controlled scenario.</p><h3><strong>What do I already have?</strong></h3><ol><li>A robotic arm (leader and follower).</li><li>An initial dataset and model with partial success.</li><li>Experience with: using the LeRobot SDK, generating a pick-and-place dataset through teleoperation, training a policy on the dataset, testing the policy.</li><li>An environment: a physical space I am comfortable working in, cameras, and relative control of lighting.</li><li>Testing: a defined task, controlled scenario, defined metrics, and in-distribution and out-of-distribution test episodes.</li><li>A test plan.</li></ol><h3><strong>What is the plan?</strong></h3><ol><li>Generate another pick-and-place dataset using the lessons learned over the summer.</li><li>Train a policy on this new dataset.</li><li>Select the best trained policy using the validation set.</li><li>Evaluate my best trained policy on the test set.</li><li>Evaluate a general-purpose robotics model such as Gemini Robotics 2 using the same test set and setup.</li><li>Evaluate a standard LLM with an MHS using the same test set and setup.</li><li>Compare performance against effort.</li><li>Evaluate how much the policy can improve through human-in-the-loop data collection.</li></ol><h3><strong>What is the detailed testing setup?</strong></h3><p><strong>Task</strong>: pick up a Lego block and place it fully inside the fixed bin.</p><p>Keep the arm bases, cameras, bin, calibration, lighting, and block orientation fixed. Place the block at the centre of the marked position. Each trial lasts 7 seconds and runs with asynchronous inference at 30 Hz; between trials, the arm returns to its initial pose and only the object/environment is reset.</p><p>The test set has 72 trials, with three repetitions of this matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*ZZIhadduzEAU1E5Kq0-KMg.png" /></figure><p>For every trial, record success (yes/no) and progress: does not reach the object (0), contacts it (0.2), grasps and lifts it (0.4), transports it over the bin (0.7), releases it without it ending inside (0.8), or places the block fully inside the bin (1.0). Report success and mean progress by distribution, without mixing ID and OOD results.</p><p>Reference: [docs/dataset2-workflow/03-model-evaluation.md](dataset2-workflow/03-model-evaluation.md).</p><h3><strong>Lessons learned from dataset collection</strong></h3><ul><li>Less diversity in goals; more diversity in positions: one task, object, and container; vary only the initial position.</li><li>Use more demonstrations per position and define positions more clearly.</li><li>Teleoperate by looking only at the cameras.</li><li>Add a third camera, because the arm frequently occludes the top camera.</li><li>Review videos/episodes to identify and re-record poor demonstrations; use replay to validate calibration, action mapping, and reproducibility.</li><li>After aborting a session, check integrity before resuming.</li></ul><h3><strong>Lessons learned from model training</strong></h3><ul><li>Use a validation set during training.</li><li>Train for at least 30k steps: 20k was only about 3.5 passes over the dataset and the loss was still decreasing.</li><li>Save intermediate checkpoints, ideally every 5k steps, and keep them on the Hub.</li><li>Monitor training and validation loss; select checkpoints using stable validation loss.</li><li>Compare checkpoints through offline inference and physical ID trials; do not select using OOD results.</li><li>shoulder_lift and elbow_flex fail most often. Inspect their errors specifically: compare the model’s predicted actions with recorded actions in known episodes for each joint; if they diverge substantially, review the demonstrations, checkpoint, or training before blaming deployment.</li></ul><h3><strong>Lessons learned from testing</strong></h3><ul><li>Run a preflight before formal testing: (1) Replay 1–3 demonstrations to confirm that the arm and calibration are correct, (2) Run a short asynchronous-inference test to confirm there are no deployment problems, such as underruns or latency, (3) Run an offline model test: send observations to the model without connecting it to the arm, generate the next actions, and compare them with the dataset actions. If the error is high, investigate or retrain before the formal test.</li><li>Define binary-success metrics and staged progress metrics.</li><li>Use fixed, repeatable scenarios.</li><li>Report ID, spatial OOD, object OOD, and combined OOD separately.</li><li>On my hardware and with my ACT policy, use asynchronous inference: it is necessary on this machine to achieve 30 Hz.</li><li>On my hardware and with my ACT policy, use the full 100-action horizon at inference time. When I executed only 50 actions, too little time remained before the queue could run empty, causing an underrun (the robot has no next action).</li><li>Tune `max_relative_target`: a limit that is too low causes frequent clamping and can prevent the policy from completing the grasp; always retain a safe limit and inspect clamp warnings.</li></ul><p><strong>Remark</strong>: this post was human-generated. AI translated some parts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ed669afdb60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robotics datasets are growing fast.]]></title>
            <link>https://medium.com/@toni3095/robotics-datasets-are-growing-fast-1f1050c8897b?source=rss-8a151e24453------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f1050c8897b</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[datasets-review]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Toni]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 20:37:13 GMT</pubDate>
            <atom:updated>2026-06-27T20:37:13.898Z</atom:updated>
            <content:encoded><![CDATA[<h3>Robotics datasets are growing fast. The biggest opportunities are now in quality, sensing, and diversity.</h3><h3>Robotics data on Hugging Face is no longer scarce.</h3><p>That is the good news.</p><p>The harder truth is that volume alone is not solving the real bottlenecks in robot learning. After mapping more than 3,000 robotics-related datasets on Hugging Face, I came away with a clear conclusion: robotics has entered a new phase. The limiting factor is no longer just collecting more trajectories. It is collecting the right trajectories, with the right labels, the right sensing, and the right task diversity.</p><p>In short: the robotics community has data, but not enough high-signal data.</p><p>The most useful datasets now are not necessarily the largest ones. They are the ones that close specific gaps: language-conditioned real robot trajectories, contact-rich manipulation with force or tactile feedback, real humanoid demonstrations, mobile manipulation, 3D perception, and more diverse robot embodiments.</p><p>This post summarizes what I found, where the gaps are, and which dataset ideas I think would have the highest impact.</p><h3>What I analyzed</h3><p>I analyzed a snapshot of <strong>3,028 robotics-related datasets on Hugging Face</strong>, collected on <strong>May 25, 2026</strong>.</p><p>The initial pool contained <strong>3,100 unique datasets</strong>, gathered from robotics-related tags and seed organizations in the robotics ecosystem. The tags included terms such as robotics, robot, lerobot, manipulation, embodied-ai, embodied, and robot-learning. I also included several seed organizations that are important in the public robotics data ecosystem, such as LeRobot, Open X-Embodiment, Dora-rs, and Hugging Face.</p><p>Then I cleaned the corpus.</p><p>Repositories with no data files were removed. Unrelated noise was filtered out. Near-identical fork swarms and repeated dataset families were deduplicated. After this process, the final corpus contained <strong>3,028 robotics datasets</strong>.</p><p>Each dataset was then classified across four practical dimensions:</p><ol><li><strong>Task</strong><br>Examples: pick-and-place, insertion, assembly, navigation, locomotion, bimanual manipulation, dexterous manipulation.</li><li><strong>Morphology</strong><br>Examples: single-arm, dual-arm, humanoid, quadruped, mobile robot, robotic hand.</li><li><strong>Environment</strong><br>Real, simulation, or unknown.</li><li><strong>Modality</strong><br>Examples: RGB, video, depth, 3D, language, proprioception, force/torque, tactile sensing.</li></ol><p>I used two classification passes.</p><p>The first was a keyword-only pass. This is conservative: high precision, but low recall. If a dataset card explicitly mentions “force torque,” “humanoid,” or “insertion,” the keyword pass can catch it. But many robotics dataset cards are short, inconsistent, or incomplete, so keyword-only classification misses a lot.</p><p>The second was an LLM-enhanced pass. This helped resolve ambiguous dataset cards, infer likely categories from sparse descriptions, and improve recall. The numbers in this post come from the LLM-enhanced classification, but comparing the keyword and LLM passes was useful because it showed where metadata quality itself is part of the problem.</p><h3>How I estimated demand</h3><p>One complication: download counts were not usable as a corpus-level signal in this snapshot. The all-time download field returned zero for all 3,028 datasets, so I did not use downloads as the primary ranking metric.</p><p>Instead, I used four alternative demand signals:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*muaW_1xeS03N8wUl4IAMgA.png" /></figure><p>I also separated <strong>LeRobot-format</strong> datasets from non-LeRobot datasets whenever possible.</p><p>That distinction matters because LeRobot-format datasets tend to have more structured schemas, more reliable modality information, and clearer episode-level metadata. Non-LeRobot datasets can be valuable, but they are more heterogeneous and often harder to compare.</p><p>The result is not a perfect ranking of robotics datasets. It is a practical map of supply, demand, and missing data.</p><h3>The main pattern: robotics has data, but not enough usable data</h3><p>The clearest example is single-arm manipulation.</p><p>Single-arm is by far the most populated morphology in the corpus, with <strong>1,088 datasets</strong>. That sounds healthy. But once you look closer, the picture changes:</p><ul><li><strong>1,088</strong> datasets are single-arm.</li><li><strong>941</strong> of those are LeRobot-format.</li><li>Only <strong>373</strong> datasets include language annotations.</li><li>Of those language datasets, <strong>294</strong> are LeRobot-format and <strong>79</strong> are non-LeRobot.</li><li>Only <strong>117</strong> datasets are both language-annotated and real-world.</li><li>Of those real language datasets, <strong>85</strong> are LeRobot-format and <strong>32</strong> are non-LeRobot.</li><li>Pick-and-place is the most common task, with <strong>622 datasets</strong>, but only <strong>70</strong> include language — about <strong>11%</strong>.</li></ul><p>That pattern appears again and again.</p><p>The top-line counts look strong. The high-value subset is much thinner.</p><p>A large amount of robotics data is still raw or weakly annotated teleoperation. Many datasets do not clearly specify whether they are real or simulated. Important modalities such as depth, 3D structure, tactile sensing, and force/torque are much less common than RGB or video. Supply is concentrated in a narrow slice of robot forms and standard tabletop tasks.</p><p>This is why I think the bottleneck is not simply data volume. It is data quality and usefulness. The field has many demonstrations. What it still lacks is enough structured, high-signal training data for generalization.</p><h3>Two kinds of gaps</h3><p>The gaps fall into two categories.</p><h4>Category 1: mass-adoption gaps</h4><p>These are areas where the community already has hardware, interest, and model demand. A dataset in one of these areas would likely be used quickly.</p><p>Examples include:</p><ul><li>language-annotated real single-arm trajectories</li><li>real humanoid whole-body manipulation</li><li>real dual-arm or bimanual manipulation</li><li>real mobile manipulation</li></ul><p>These are not obscure research niches. They are areas where the hardware and model demand already exist, but the public data is still not good enough.</p><h4>Category 2: niche but high-value gaps</h4><p>These areas have thinner supply on Hugging Face, but strong external demand from robotics research, industrial benchmarks, or foundation-model development.</p><p>Examples include:</p><ul><li>contact-rich assembly and insertion with force/torque or tactile sensing</li><li>depth and 3D point-cloud perception</li><li>quadruped loco-manipulation</li><li>dexterous hand data with tactile sensing</li></ul><p>These are not small because nobody cares. They are small because the data is harder to collect. And that is exactly why they matter.</p><h3>The strongest opportunities</h3><p>Here is the summary of the dataset opportunities I would prioritize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*teE8EmwL11CPznvM-pJmSw.png" /></figure><p>Now let’s go through each opportunity.</p><h3>1. Language-annotated real single-arm trajectories</h3><p>This is the easiest high-impact dataset to build.</p><p>Single-arm robots dominate the dataset landscape. I found <strong>1,088 single-arm datasets</strong>, including <strong>941 LeRobot-format datasets</strong> and <strong>147 non-LeRobot datasets</strong>. But most of the value is missing because much of this data is raw teleoperation without good task labels or language instructions.</p><p>Only <strong>373 datasets</strong> include language annotations. Of those, <strong>294</strong> are LeRobot-format and <strong>79</strong> are non-LeRobot.</p><p>The real gap is even clearer when we ask how many language datasets are actually real-world. Only <strong>117</strong> datasets are both language-annotated and real. Of those, <strong>85</strong> are LeRobot-format and <strong>32</strong> are non-LeRobot.</p><p>In the most common task, pick-and-place, language appears in only <strong>70 out of 622 datasets</strong>, or roughly <strong>11%</strong>.</p><p>That is a very clear quality gap.</p><p>The demand signal is also strong. Language is the freshest modality in the corpus, with a recency share of <strong>0.976</strong>. In other words, the community is actively producing language-paired robot data right now, but much of it is still simulated, caption-only, or not tied to real robot trajectories.</p><p>The external demand is obvious: every generalist vision-language-action system needs language-to-action pairs for fine-tuning. This includes models and systems in the direction of π₀, π₀.5, Octo, SmolVLA, FLOWER, EO-1, and other VLA-style robot policies.</p><p>The hardware also exists. SO-101 appears <strong>48</strong> times in dataset cards. SO-100 appears <strong>46</strong> times. Koch appears <strong>16</strong> times. These are robots people can actually own, build, or reproduce.</p><p>The proposed dataset is simple:</p><ul><li>Robot: SO-101, SO-100, Koch, or a similar low-cost single-arm platform.</li><li>Setting: real-world tabletop and household environments.</li><li>Modalities: RGB, proprioception, and per-episode natural-language instruction.</li><li>Tasks: 50–100 distinct household manipulation tasks.</li><li>Scale: roughly 400 episodes.</li></ul><p>The key differentiator is not raw scale. It is <strong>language quality, task breadth, and real-world coverage</strong>.</p><p>A useful dataset here would not just say “pick object.” It would include instructions like:</p><ul><li>“Place the red cup next to the bowl.”</li><li>“Move the sponge from the table to the tray.”</li><li>“Put the small box inside the larger container.”</li><li>“Pick up the object closest to the left edge of the table.”</li></ul><p>This kind of dataset directly supports vision-language-action systems. It is also realistic for many labs, hobbyists, and open-source robotics communities to reproduce.</p><p>That combination makes it the best mass-adoption opportunity.</p><h3>2. Contact-rich assembly and insertion with force/torque</h3><p>This is the strongest demand/supply inversion I found.</p><p>Assembly and insertion are not exotic tasks. They are central to real industrial robotics. Peg insertion, connector mating, part alignment, fastening, and disassembly are exactly the kinds of skills robots need in manufacturing, logistics, maintenance, and warehouse automation.</p><p>But public data is extremely thin.</p><p>In the corpus:</p><ul><li><strong>35 datasets</strong> are classified as assembly.</li><li>Of those, <strong>18</strong> are LeRobot-format and <strong>17</strong> are non-LeRobot.</li><li><strong>70 datasets</strong> are classified as insertion.</li><li><strong>91 datasets</strong> include force/torque.</li><li>Of those force/torque datasets, <strong>49</strong> are LeRobot-format and <strong>42</strong> are non-LeRobot.</li><li>Only <strong>8 datasets</strong> combine insertion with force/torque.</li><li>Only <strong>5 datasets</strong> combine assembly with force/torque.</li><li>Only <strong>34 force/torque datasets</strong> are clearly real-world.</li><li>Only <strong>11 datasets</strong> are real, contact-rich manipulation datasets involving force/torque plus grasping, insertion, or assembly.</li><li>Of those 11, only <strong>1</strong> is LeRobot-format.</li></ul><p>That is surprisingly small.</p><p>It is especially striking because robotics research talks constantly about contact-rich learning, tactile feedback, and force-aware manipulation. The public dataset ecosystem does not yet reflect that ambition.</p><p>The demand signal here is subtle. Force/torque has only <strong>26 likes</strong>, the lowest of the major modality signals. Insertion has <strong>47 likes</strong>. The best-engaged exemplar in this area has only a handful of likes.</p><p>But I do not interpret that as low demand.</p><p>I interpret it as missing supply.</p><p>For contact-rich assembly and insertion, the demand lives more in industrial robotics, benchmarks, and research papers than in Hugging Face popularity. Benchmarks such as the NIST Task Board exist because assembly is a real industrial problem. Datasets and systems such as REASSEMBLE, RH20T, and VinT-6D point in the same direction: real manipulation needs more than images. It needs touch, force, audio, proprioception, and contact-aware learning.</p><p>There is another clue: the keyword “tactile” appears in <strong>85 dataset cards</strong>. Many teams talk about tactile sensing. But only <strong>91 datasets</strong> actually log force/torque, and only <strong>34</strong> of those are clearly real-world.</p><p>That mismatch is the opportunity.</p><p>A strong dataset here would include:</p><ul><li>Robot: Franka, UR5, or another widely used manipulator.</li><li>Tasks: peg-in-hole, connector insertion, NIST-style assembly boards, simple disassembly.</li><li>Modalities: RGB, depth, 6-axis force/torque, proprioception.</li><li>Labels: success/failure, task stage, contact event, recovery behavior.</li><li>Scale: roughly 300 episodes.</li></ul><p>This dataset would matter for two reasons.</p><p>First, it would support policy learning for tasks where vision alone is not enough. In insertion and assembly, the important signal often appears at contact: friction, alignment, jamming, compliance, slipping, and small corrective motions.</p><p>Second, it would create a much stronger evaluation benchmark. A robot policy that works on contact-rich assembly is more deployment-relevant than a policy that only solves clean tabletop pick-and-place.</p><p>If someone wants to build a dataset that stands out immediately, this is one of the best options.</p><h3>3. Real humanoid whole-body manipulation</h3><p>Humanoid data is growing quickly, but the real-world subset is still much thinner than the headline numbers suggest.</p><p>I found:</p><ul><li><strong>442 humanoid datasets</strong> in total.</li><li><strong>75</strong> are LeRobot-format.</li><li><strong>367</strong> are non-LeRobot.</li><li>Only <strong>128</strong> are clearly real-world.</li><li>Only <strong>28</strong> are both real-world and LeRobot-format.</li><li><strong>122</strong> are simulation datasets.</li><li><strong>235</strong> have unknown environment labels.</li><li>Humanoid datasets have <strong>419 total likes</strong>.</li><li>Humanoid recency is <strong>0.968</strong>, making it one of the freshest morphology categories.</li></ul><p>This means humanoid data is active and visible, but still uneven. A lot of it is simulated, unclear, or not structured in the most reusable way.</p><p>The external demand is obvious. Humanoid foundation models and systems such as GR00T need real-world fine-tuning data. Simulated humanoid data is useful, but real deployment requires real demonstrations, real contacts, real balance failures, real viewpoint changes, and real object interaction.</p><p>The anchors also show the direction of the ecosystem. Unitree G1 appears <strong>39</strong> times in dataset cards. H1 appears <strong>34</strong> times. The phrase “whole-body” appears <strong>19</strong> times. Public humanoid datasets such as RoboMIND show meaningful engagement, and some G1 datasets already appear to attract substantial usage.</p><p>The proposed dataset:</p><ul><li>Robot: Unitree G1, H1, or a similar humanoid platform.</li><li>Setting: real indoor environments.</li><li>Modalities: RGB, proprioception, language.</li><li>Tasks: carry, place, reach, reposition, pick while stepping, manipulate while moving.</li><li>Scale: roughly 500 episodes.</li></ul><p>The key is whole-body loco-manipulation.</p><p>Many robot manipulation datasets are static: the robot stands in front of a table and moves its arms. But humanoids are interesting because they combine mobility, balance, body posture, reaching, and manipulation. The dataset should reflect that.</p><p>Useful tasks might include:</p><ul><li>carrying an object from one table to another</li><li>walking to a shelf and placing an item</li><li>bending or reaching to pick up an object</li><li>repositioning the body to manipulate something out of easy reach</li><li>opening or closing a container while maintaining balance</li></ul><p>Humanoid models are advancing quickly. But without real-world fine-tuning data, it is hard to know how much of that progress transfers into physical environments.</p><p>That makes real humanoid whole-body manipulation one of the most important mass-adoption dataset gaps.</p><h3>4. Real dual-arm and bimanual manipulation</h3><p>Dual-arm and bimanual manipulation show one of the strongest demand signals in the analysis.</p><p>The corpus contains:</p><ul><li><strong>367 dual-arm datasets</strong>.</li><li><strong>266</strong> are LeRobot-format.</li><li><strong>101</strong> are non-LeRobot.</li><li>Only <strong>101 dual-arm datasets</strong> are clearly real-world.</li><li>Of those real dual-arm datasets, <strong>66</strong> are LeRobot-format and <strong>35</strong> are non-LeRobot.</li><li><strong>220 datasets</strong> are classified as bimanual tasks.</li><li>Only <strong>51 bimanual datasets</strong> are confirmed real-world.</li><li>Only <strong>11 bimanual datasets</strong> include force/torque.</li><li>Dual-arm morphology has <strong>656 total likes</strong>, one of the strongest signals in the entire analysis.</li><li>Bimanual tasks have <strong>474 likes</strong>.</li></ul><p>This is a classic case where interest is high, but the best data subset is still limited.</p><p>ALOHA is one of the strongest anchors in the corpus, appearing <strong>80</strong> times in dataset cards. It is one of the most visible platforms for low-cost bimanual manipulation. Generalist robot policies such as π₀ and π₀.5 also prominently target dual-arm tasks, including laundry folding, table cleaning, and box assembly.</p><p>The proposed dataset:</p><ul><li>Robot: ALOHA-style dual-arm setup or another accessible bimanual platform.</li><li>Setting: real tabletop and household manipulation.</li><li>Modalities: stereo RGB, proprioception, force/torque if available.</li><li>Tasks: handover, folding, open/close, container handling, cable routing, simple assembly.</li><li>Scale: roughly 400 episodes.</li></ul><p>The important thing about bimanual data is that it supports tasks single-arm datasets cannot represent well.</p><p>Examples:</p><ul><li>holding a container with one hand while placing an object inside with the other</li><li>opening a box or drawer while stabilizing it</li><li>folding cloth</li><li>transferring objects between hands</li><li>aligning two parts before assembly</li><li>manipulating deformable or articulated objects</li></ul><p>These tasks are much closer to the everyday manipulation problems we eventually want general-purpose robots to solve.</p><p>Given the strong interest around ALOHA-style systems and dual-arm foundation-model demonstrations, this is a very practical dataset opportunity.</p><h3>5. Real mobile manipulation</h3><p>Mobile manipulation is strategically important, but still lightly covered.</p><p>I found:</p><ul><li>Only <strong>41 datasets</strong> are explicitly tagged as mobile manipulation.</li><li><strong>26</strong> are LeRobot-format.</li><li><strong>15</strong> are non-LeRobot.</li><li>Only <strong>21</strong> are clearly real-world.</li><li>Of those real mobile-manipulation datasets, <strong>9</strong> are LeRobot-format and <strong>12</strong> are non-LeRobot.</li><li>The broader mobile morphology has <strong>76 datasets</strong> total.</li><li>Mobile manipulation has <strong>188 likes</strong>, or roughly <strong>4.6 likes per dataset</strong>.</li></ul><p>This tells me the area is thin, but valuable.</p><p>The broader mobile category shows both real and simulated data, but neither side is especially well covered. There are public examples with strong interest, including open-world mobile manipulation datasets and kitchen-demonstration datasets, but the total supply remains small compared with the strategic importance of the problem.</p><p>The external anchors also point to real hardware demand. LeKiwi appears <strong>6</strong> times in dataset cards. Reachy2 appears <strong>3</strong> times. reBot appears <strong>3</strong> times. These are not just abstract robot types; they are platforms people are starting to build around.</p><p>Most manipulation datasets isolate the arm. Most navigation datasets isolate the base. Real deployment requires both.</p><p>A useful mobile manipulation dataset would combine navigation and manipulation in the same episode:</p><ul><li>Robot: LeKiwi, Reachy2, or another mobile manipulator.</li><li>Setting: real rooms, homes, offices, or lab spaces.</li><li>Modalities: RGB, proprioception, language, possibly depth.</li><li>Tasks: navigate to object, approach, grasp, transport, place.</li><li>Scale: roughly 300 episodes.</li></ul><p>Example tasks:</p><ul><li>“Go to the shelf, pick up the bottle, and place it on the table.”</li><li>“Find the red object in the room and bring it to the basket.”</li><li>“Move the mug from the desk to the kitchen counter.”</li><li>“Navigate around the chair and place the item in the box.”</li></ul><p>This matters because tabletop-only data does not teach a robot how to deal with embodied context: moving through space, recovering from bad viewpoints, approaching objects, and coordinating base and arm control.</p><p>Mobile manipulation is one of the clearest ways to move from isolated skills toward complete embodied tasks.</p><h3>6. Depth and 3D perception for manipulation</h3><p>Robotics models will eventually need more than RGB.</p><p>RGB is useful, but many manipulation failures are geometric: occlusion, clutter, object pose, depth ambiguity, collision risk, grasp affordances, and 6-DoF placement.</p><p>Yet 3D data remains surprisingly underrepresented.</p><p>In the corpus:</p><ul><li><strong>189 datasets</strong> include depth.</li><li>Only <strong>29</strong> depth datasets are LeRobot-format.</li><li><strong>160</strong> depth datasets are non-LeRobot.</li><li><strong>89</strong> depth datasets are clearly real-world.</li><li>Of those real depth datasets, only <strong>14</strong> are LeRobot-format and <strong>75</strong> are non-LeRobot.</li><li>Only <strong>36 datasets</strong> are tagged as 3D.</li><li><strong>0</strong> of the 3D datasets are LeRobot-format.</li><li>Depth has <strong>665 likes</strong>, the third-highest modality signal behind video and RGB.</li><li>3D has <strong>417 likes</strong> across only <strong>36 datasets</strong>, or roughly <strong>11.6 likes per dataset</strong>.</li></ul><p>That is one of the strongest like-density signals in the whole analysis.</p><p>People care about 3D robotics data, but the structured supply is still small.</p><p>The external anchors support this interpretation. ManiSkill appears <strong>20</strong> times and often includes point-cloud observations. DROID appears <strong>65</strong> times. The keyword “occupancy” appears <strong>10</strong> times. Recent world-model and generalist-policy work also points toward richer sensor diversity, not just RGB.</p><p>The proposed dataset:</p><ul><li>Robot: Franka or another common manipulator.</li><li>Setting: cluttered real manipulation scenes, optionally paired with simulation.</li><li>Modalities: RGB-D, registered point clouds, proprioception.</li><li>Tasks: cluttered-bin grasping, 6-DoF grasping, precise placement, occluded-object retrieval.</li><li>Scale: roughly 300 episodes.</li></ul><p>This dataset would be useful for policies that need spatial reasoning, not just image imitation.</p><p>It could support questions like:</p><ul><li>Can the robot infer object geometry from partial views?</li><li>Can it grasp in clutter without colliding?</li><li>Can it place an object in a constrained pose?</li><li>Can it generalize across object shapes and occlusions?</li></ul><p>As robot learning moves toward world models and generalist policies, sensor diversity will matter more. Depth and 3D perception are still underdeveloped in the public robotics dataset ecosystem.</p><h3>7. Real quadruped loco-manipulation</h3><p>Quadrupeds are common in labs, but real manipulation data for them is still scarce.</p><p>The corpus contains:</p><ul><li><strong>45 quadruped datasets</strong>.</li><li><strong>10</strong> are LeRobot-format.</li><li><strong>35</strong> are non-LeRobot.</li><li>Only <strong>17</strong> are clearly real-world.</li><li>Of those real quadruped datasets, <strong>7</strong> are LeRobot-format and <strong>10</strong> are non-LeRobot.</li><li><strong>29</strong> are simulation datasets.</li><li>Quadruped datasets have <strong>265 likes</strong>, or roughly <strong>5.9 likes per dataset</strong>.</li></ul><p>The current public data is much stronger for locomotion than for manipulation.</p><p>That leaves a gap: legged robots that not only move, but interact with the world.</p><p>It is also worth separating two related but different signals. The broader legged-robotics ecosystem overlaps with humanoid and locomotion research, but the specific quadruped manipulation gap is better represented by platforms such as Unitree Go2 with an arm. In other words, the demand is not just “more quadruped locomotion.” It is quadruped loco-manipulation in real environments.</p><p>The proposed dataset:</p><ul><li>Robot: Unitree Go2 or similar quadruped with an arm.</li><li>Setting: real semi-structured spaces.</li><li>Modalities: RGB, proprioception, force/torque if available.</li><li>Tasks: stair traversal while carrying objects, reaching, placing, inspection-style interaction.</li><li>Scale: roughly 200 episodes.</li></ul><p>This dataset would expand the embodiment diversity of public robot learning data.</p><p>It would also move beyond flat-ground locomotion. A useful quadruped loco-manipulation dataset should include body motion, terrain, balance, object interaction, and manipulation under imperfect posture.</p><p>Example tasks:</p><ul><li>walk up a step while carrying an object</li><li>approach a shelf and press a button</li><li>pick up an object from the floor and transport it</li><li>reach around an obstacle</li><li>place a tool in a target location after walking</li></ul><p>This is a smaller opportunity than single-arm language data, but strategically important. It would help public robotics datasets represent more than tabletop arms and humanoids.</p><h3>8. Dexterous hand plus tactile sensing</h3><p>Dexterous manipulation remains one of the hardest and most interesting gaps.</p><p>The corpus contains:</p><ul><li><strong>30 dexterous task datasets</strong>.</li><li><strong>13</strong> are LeRobot-format.</li><li><strong>17</strong> are non-LeRobot.</li><li><strong>36 hand morphology datasets</strong>.</li><li><strong>21</strong> are LeRobot-format.</li><li><strong>15</strong> are non-LeRobot.</li><li>Only <strong>17 dexterous datasets</strong> are clearly real-world.</li><li>Of those real dexterous datasets, <strong>6</strong> are LeRobot-format and <strong>11</strong> are non-LeRobot.</li><li>Only <strong>6 dexterous datasets</strong> include force/torque.</li><li>Dexterous task recency is <strong>0.967</strong>.</li><li>Hand morphology recency is <strong>1.0</strong>, meaning every hand dataset in this classification was recent.</li><li>Likes are low, around <strong>14</strong> for dexterous task datasets.</li></ul><p>I would not read the low likes as low importance. I would read them as low mature supply.</p><p>The keyword “dexterous” appears <strong>29</strong> times in dataset cards. “Tactile” appears <strong>85</strong> times. Research systems such as π₀ and VinT-6D also point toward dexterous, contact-rich, multi-modal manipulation.</p><p>The proposed dataset:</p><ul><li>Robot: LEAP Hand, Allegro Hand, or another multi-finger hand.</li><li>Setting: real tabletop manipulation.</li><li>Modalities: RGB, tactile sensing, proprioception.</li><li>Tasks: in-hand reorientation, rolling, shifting grip, stabilizing objects, tool-like manipulation.</li><li>Scale: roughly 200 episodes.</li></ul><p>The important part is tactile sensing.</p><p>Dexterous manipulation is fundamentally contact-rich. Vision can tell you where an object is, but not always whether it is slipping, how pressure is distributed, or whether the grasp is stable. For in-hand manipulation, tactile data is not a luxury modality. It is often the missing state.</p><p>This dataset would be difficult to collect well, but it could be very valuable. Public corpora still struggle to provide real multi-finger, tactile-rich manipulation data at meaningful scale.</p><h3>What I would not prioritize</h3><p>A good gap analysis should identify low-value directions too.</p><p>The first thing I would not prioritize is <strong>more raw single-arm teleoperation without better labeling</strong>.</p><p>There are already <strong>941 LeRobot-format single-arm datasets</strong>. Adding more unlabeled trajectories has low marginal value. The gap is not “more single-arm data.” The gap is language, task labels, real-world diversity, and structured metadata.</p><p>The second thing I would be cautious about is <strong>sim-only language data</strong> if the goal is real-world robot learning. Simulation is useful, and simulated datasets can help with pretraining and evaluation. But they do not solve the main bottleneck for physical robot fine-tuning.</p><p>The third thing I would avoid is confusing repeated synthetic or near-duplicate dataset families with real ecosystem depth. A high dataset count does not necessarily mean broad usefulness. Many repeated cards can inflate supply without adding new robots, tasks, sensors, or environments.</p><p>The strongest opportunities are not “more of the same.”</p><p>They are targeted datasets that add missing structure, missing sensing, or missing embodiments.</p><h3>Caveats</h3><p>There are three important caveats.</p><p>First, download counts were not reliable in this snapshot. The corpus-level all-time download field returned zero for all 3,028 datasets, so I did not use downloads as the primary demand metric. Likes, recency, external anchors, and research demand are imperfect substitutes, but they were more useful for this snapshot.</p><p>Second, many dataset cards are incomplete. Even after LLM-assisted classification, unknown rates remained significant:</p><ul><li>task unknown: about <strong>42%</strong></li><li>morphology unknown: about <strong>33%</strong></li><li>environment unknown: about <strong>46%</strong></li></ul><p>That means the labeled counts should be treated as floors, not perfect totals. For example, if I say there are 128 real humanoid datasets, that does not necessarily mean there are only 128 real humanoid datasets on Hugging Face. It means 128 were clearly identifiable as real humanoid datasets under this classification.</p><p>Third, modality labels are more reliable than task, morphology, or environment labels, especially for structured LeRobot datasets. On the LeRobot half of the corpus, modality unknown was only about <strong>2.1%</strong>. That makes the force/torque, depth, and 3D gaps especially important, because they are less likely to be just metadata artifacts.</p><p>I also did not use a single composite opportunity score. I think that would create false precision. Instead, I looked directly at supply, likes, recency, external anchors, and research demand.</p><h3>The broader conclusion</h3><p>Robotics datasets are maturing unevenly.</p><p>The ecosystem is no longer empty. Some parts are already crowded. But the crowded parts are not always the most valuable ones.</p><p>The public dataset landscape still underinvests in:</p><ul><li>language-conditioned real trajectories</li><li>contact-rich sensing</li><li>structured real-world humanoid data</li><li>real mobile manipulation</li><li>depth and 3D perception</li><li>quadruped loco-manipulation</li><li>tactile dexterous manipulation</li><li>embodiment diversity</li></ul><p>That is why I think the next wave of impact in robotics data will not come from simply publishing more trajectories. It will come from datasets that are better targeted, better annotated, and better aligned with the capabilities we actually want robots to learn.</p><p>The best near-term opportunity is <strong>language-annotated real single-arm data</strong>: accessible hardware, clear demand, and a direct path to usefulness.</p><p>The best strategic opportunity is <strong>contact-rich assembly and insertion with force/torque</strong>: harder to collect, but much closer to the industrial manipulation problems that matter.</p><p>Together, these two examples summarize the broader point.</p><p>Robotics does not just need more data.</p><p>It needs better data: real, labeled, multimodal, contact-aware, and diverse enough to teach robots skills that transfer beyond the demo table.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f1050c8897b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Context Window Management in Claude Code and GitHub Copilot]]></title>
            <link>https://medium.com/@toni3095/context-window-management-in-claude-code-and-github-copilot-0d108b9f0a81?source=rss-8a151e24453------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d108b9f0a81</guid>
            <category><![CDATA[context-window]]></category>
            <category><![CDATA[context-management]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[claude-code-leak]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Toni]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 17:47:34 GMT</pubDate>
            <atom:updated>2026-04-10T17:49:55.723Z</atom:updated>
            <content:encoded><![CDATA[<p>The Claude Code leak gave us two things:</p><ol><li>Memes</li><li>Access to the guts of a world-class agentic system</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cfAypI-1OLeqOzTGajd-Qw.png" /></figure><p>I’ll focus on the latter and leave the memes for you. This post breaks down how context window management works in both Claude Code and GitHub Copilot. The part of the system that decides what your agent forgets and how, and also buys itself room to think.</p><p>The general idea is that we follow 3 principles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ouMsFx29t6ID-ykJ5DrSOA.png" /></figure><p>But we want the deep dive. Let’s start with Claude Code!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/0*hLYA0cDJpuGkaLXx" /></figure><h3>Claude Code Context Window Management</h3><p>At the start of every iteration, this pipeline runs:</p><pre>getMessagesAfterCompactBoundary()   ← slice history at last compact boundary<br>applyToolResultBudget()             ← per-message content budget cap<br> │<br> ├─ 1. Snip                         <br> ├─ 2. Microcompact<br> ├─ 3. Context Collapse             <br> └─ 4. Autocompact                  ← DISABLED when Context Collapse is on</pre><p>The execution order follows a clear philosophy: <strong>avoid calling an LLM unless absolutely necessary.</strong> Snip drops entire messages → Microcompact masks recomputable tool results → Context Collapse LLM-summarizes selected segments → and only as a last resort, Autocompact LLM-summarizes the entire history.</p><h4><strong>1. Snip</strong></h4><p><strong>What it does:</strong> Removes entire older messages from the context window.</p><p><strong>When it happens</strong>: Appears to run on every iteration, but since the snip module’s implementation wasn’t available in the leaked source (only compiled JS), there may be additional gates.</p><p><strong>Key details:</strong></p><ul><li><strong>The user never notices. A separate REPL version without the message removal is maintained. </strong>The method projectSnippedView() filters out snipped messages in model-facing paths. But the UI retains full scrollback. The user and the LLM don’t need to see the same thing</li><li><strong>No special cache handling. </strong><em>Snip </em>is very aggressive, we save a lot of context at the cost of a cache break for that turn.</li><li>To maintain downstream stages informed of the final token count,<strong> t</strong>he <em>Snip </em>module returns this triple with a count of the tokens freed:</li></ul><pre>{ messages, tokensFreed, boundaryMessage? }</pre><p><strong>What happens after: </strong>The flow always continues to <em>Microcompact</em> module even if snip has removed many tokens.</p><p>Snip is blunt , it just drops entire messages. But what about tool results that could be recomputed? That’s Microcompact’s job.</p><h4>2. Microcompact</h4><p><strong>What it does:</strong> Replaces the content of certain tool results with &#39;[Old tool result content cleared]&#39;, keeping the tool call structure intact.</p><ul><li>Spirit: “if it can be recomputed, remove it”</li></ul><p><strong>When it happens</strong>: When the number of tool results exceeds a certain threshold OR when a long time has elapsed since the last assistant message.</p><p><strong>Key details:</strong></p><ul><li><strong>Tools that can be compacted</strong>: FileRead, Shell tools, Grep, Glob, WebSearch, WebFetch, FileEdit, FileWrite</li><li><strong>Two sub-paths:</strong></li></ul><p><strong>A) Cached Microcompact</strong>: triggered by a tool count threshold.</p><ul><li><strong>Cache aware. </strong>The messages you send to the LLM are unchanged. Instead, it queues pendingCacheEditsthat are applied at the API layer via cache_edits blocks. This is cache-aware redaction, not deletion since the API handles the removal on its side.</li></ul><p><strong>B) Time-based Microcompact</strong>: triggered by a time gap since the last assistant message.</p><ul><li><strong>Not cache aware. </strong>Directly mutates message content. It does not care about cache because it is executed when the cache is already cold.</li></ul><p><strong>What happens after: </strong>The flow continues to <em>Context Collapse </em>or <em>Autocompact </em>even if it has removed many tokens.</p><p>At this point, the cheap tricks are exhausted: we’ve dropped messages and cleared recomputable tool results. If the context is still too large, it’s time to bring in an LLM.</p><h4>3. Context Collapse</h4><p><strong>What it does:</strong> Groups messages into segments and LLM-summarizes older ones, replacing them with summaries.</p><p><strong>When it happens</strong>: When the 90% context window is full.</p><p><strong>Key details:</strong></p><ul><li><strong>Again, the user never notices. </strong>The REPL retains the full history and collapse is a read-time projection.</li><li><strong>When context window is 90% full, it triggers in a non-blocking manner. At 95% full, it blocks everything and forces collapse first</strong>.</li><li><strong>Cache aware. </strong>Again, cache is kept thanks to a smart projection mechanism.</li></ul><p><strong>What happens after:</strong></p><ul><li>If the prompt length now fits, proceed to LLM call.</li><li>If a prompt-too-long (413) error happens during the collapse, it drains all staged summarized segments, applies them and retries. If the prompt is still too long, it falls back to Autocompact.</li></ul><p>Context Collapse tries to be surgical . It summarizes segments, not the whole history. When even that isn’t enough, it’s time for the nuclear option.</p><h4>4. Autocompact</h4><p><strong>What it does:</strong> The armageddon mechanism. Summarizes the <strong>entire conversation</strong> with an LLM into a dense text block.</p><p><strong>When it happens</strong>: When the token count is very close to the context window; except if Context Collapse is enabled.</p><p><strong>Key Details</strong>:</p><ol><li><strong>Sends all messages to the LLM with a summarization prompt</strong>.</li><li><strong>If the summarization request hits a 413 error happens, drop old stuff and retry</strong>. The method truncateHeadForPTLRetry drops the oldest API-round groups and retries, up to MAX_PTL_RETRIES = 3 .</li><li><strong>After 3 consecutive failures, stops trying</strong>. This was added after a production incident where sessions were wasting ~250K API calls/day in retries.</li><li><strong>On success: re-injects attachments. </strong>Open files up to 5, agent listings, MCP instructions, plan mode context, session hooks, invoked skills.</li></ol><p><strong>What happens after:</strong></p><ul><li>If the prompt length now fits, proceed to LLM call.</li><li>If the prompt is still too long, drops the oldest group and tries a final full conversation summary via LLM.</li><li>And if, after all retries, we still get the 413, it surfaces the error to the user.</li></ul><p>Claude code leak gave us access to the guts of a world-class agentic solution. But there was already a successful open-source project doing the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DDE9y6DiCZPKY1Lw.png" /></figure><h3><strong>GitHub Copilot Context Management</strong></h3><p>The philosophy is fundamentally different from Claude Code: instead of retroactively mutating messages already sent, Copilot <strong>rebuilds the entire prompt from scratch on every iteration</strong>, deciding at render time what fits.</p><pre>buildPrompt():<br>    [pre-render: apply any previously completed background compaction]<br>    <br>    renderer.render() <br>        ├── Layer 1: each ToolResult truncates itself during rendering<br>        ├── Layer 2: flex properties distribute space across rounds<br>        └── Layer 3: if still over budget, prune lowest-priority elements<br>    <br>    if BudgetExceededError: [SUMMARIZATION LAYERS]<br>        Layer 4 OR 5 OR 6 OR 7 (exactly one, by config)<br>    <br>    [post-render: maybe start background compaction for next iteration]</pre><h3>RENDER Layers</h3><h4><strong>Layer 1: Tool Result Truncation</strong></h4><p><strong>What it does</strong>: cap tool results</p><p><strong>When it happens</strong>: on every tool result.</p><p><strong>Key details:</strong></p><ul><li><strong>All tool results are hard-capped.</strong> If they exceed a defined threshold, we truncate.</li><li><strong>Very long results are never included in context</strong>: Large Tool Results to Disk mechanism (toolCalling.tsx:793) replaces results &gt;8KB with a pointer — except for search subagent, execution subagent, and memory tool results.</li><li>Spirit: “if it can be recomputed, remove it”.</li></ul><pre>export const LargeToolResultsToDiskThreshold = defineSetting&lt;number&gt;(<br> &#39;chat.agent.largeToolResultsToDisk.thresholdBytes&#39;,<br> ConfigType.ExperimentBased,<br> 8 * 1024<br>);</pre><h4><strong>Layer 2: Flex Budget Allocation</strong></h4><p><strong>What it does:</strong> Distributes available token space unevenly across tool call rounds, giving newer rounds more space than older ones.</p><p><strong>When it happens</strong>: always</p><p><strong>Key details</strong>: Each message and tool call is assigned a priority and a flexGrow weight. The renderer uses these to distribute remaining space — essentially a CSS flexbox model for tokens. Newer turns get proportionally more budget, so recent context is preserved at higher fidelity.</p><h4><strong>Layer 3: Priority-based Pruning</strong></h4><p><strong>What it does:</strong> This is Claude’s snip equivalent: it removes the lowest priority elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*zMfRx29_iUCvmhjLaS1dYA.png" /></figure><p><strong>When it happens</strong>: When the rendered prompt exceeds the token budget</p><p><strong>Key details:</strong></p><ul><li><strong>Repeat until it fits or there are no more removable elements</strong>: renders the full sequence of messages and tool results, counts tokens, and if over budget, removes the lowest-priority ChatMessage and re-counts. Repeat until it fits or there are no more removable elements.</li></ul><p><strong>What happens after:</strong></p><ul><li>If the new prompt fits, proceed to LLM call.</li><li>if not, enter LLM-summarization.</li></ul><h3><strong>SUMMARIZATION Layers</strong></h3><ul><li>Only one of the layers 4, 5, 6 or 7 happen. They are mutually exclusive.</li><li>Layer 4 is the default.</li><li>Unless we use OpenAI models, in which case we use layer 7.</li></ul><h4><strong>Layer 4: Foreground Summarization</strong></h4><p><strong>What it does: </strong>this is similar to Claude’s Autocompact: LLM- summarize the entire conversation history into a structured document.</p><p><strong>When it happens</strong>: after layer 3 if BudgetExceededError is thrown.</p><p><strong>What happens after</strong>:</p><ul><li>If the new prompt fits, proceed to LLM call.</li><li>If it doesnt, it retry with some extra tokens. If that fails, surface the error to the user.</li></ul><h4><strong>Layer 5: Inline Summarization (experimental)</strong></h4><p><strong>What it does:</strong> Instead of a separate LLM call to summarize, appends a “please summarize now” user message to the existing prompt.</p><p><strong>When it happens</strong>: after layer 3 if BudgetExceededError is thrown.</p><p><strong>Key details</strong>:</p><ul><li>Gives the budget a 15% expansion (INLINE_SUMMARIZATION_BUDGET_EXPANSION = 1.15) so the prompt fits with the extra instruction appended.</li><li><strong>Cache aware</strong>! Since we keep the conversation history and append a message at the end, it maximizes cache reuse even for summarization, while layer 4 does not.</li></ul><p><strong>What happens after</strong>:</p><ul><li>If the new prompt fits, proceed to LLM call.</li><li>If it doesnt, falls back to Layer 4.</li></ul><h4><strong>Layer 6: Background Compaction</strong></h4><p><strong>What it does:</strong> same as layer 4, but asynchronously, so the compacted result is ready by the next iteration.</p><p><strong>When it happens</strong>:</p><ul><li>At <strong>≥80% capacity</strong> (post-render, idle): kicks off background compaction so it’s ready for a future iteration.</li><li>At <strong>≥95% capacity</strong> (pre-render, in-progress): blocks and waits for the running compaction to finish, then applies it before rendering.</li><li>On <strong>BudgetExceededError</strong>: if a background compaction is already running or completed, waits for / applies that result instead of firing a new LLM request.</li></ul><p><strong>What happens after</strong>:</p><ul><li>If the new prompt fits, proceed to LLM call.</li><li>If it doesnt, falls back to Layer 4.</li></ul><h4><strong>Layer 7: Responses API Server-Side Compaction</strong></h4><p><strong>What is does:</strong> Delegates context management entirely to OpenAI’s Responses API.</p><p><strong>When it happens</strong>: if we are using OpenAI models AND we reach 90% model context window.</p><p><strong>What happens after</strong>:</p><ul><li>If the prompt fits, proceed to the LLM call.</li><li>If it doesn’t, surface the error to the user.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*6LCZOm77zCDFINsA3w7ckQ.png" /></figure><h3>Summary of the comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ykrh41Mi9jhESofGM06Ejw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d108b9f0a81" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>