{"slug": "read-bigger-threads", "title": "Read Bigger Threads", "summary": "Amp rewrote its read_thread tool to handle long threads, which can now exceed 21 million tokens due to compaction. The new version uses a subagent with GLM 5.2 to extract information more accurately, prioritizing correctness over speed.", "body_md": "Threads outgrew `read_thread`\n\n, so we rewrote it.\n\n`read_thread`\n\nis [the tool that lets Amp pull context out of other Amp threads](https://ampcode.com/news/read-threads) when you mention them. Before the rewrite, it would fetch the whole thread and extract the relevant parts in a single call to another LLM.\n\nThat used to work when threads were shorter and contained a single context window. Then we added [compaction](https://ampcode.com/news/neo) and now a single thread can run for weeks. Our longest thread has been compacted over 68 times — without compaction, it would be over 21 million tokens long.\n\nA 21-million-token thread doesn't fit into a single context window, so asking another LLM to extract relevant parts doesn't work anymore. And even threads with 1 million tokens that fit gave bad answers: one giant prompt over-weights whatever the thread ended with or started with and ignores the information in the middle.\n\n`read_thread`\n\nis now a subagent tuned to extract information from long threads. The subagent takes a thread and a question, searches the thread, reads the messages, and checks whether later work revised or reverted what it found.\n\nOur first version of the `read_thread`\n\nsubagent answered from the first plausible hit. In a long thread, the first hit is often an attempt that was later revised or reverted. We switched the model to GLM 5.2 from Gemini 3.5 Flash and tuned its prompt to optimize for correctness over speed:\n\nIt also works on the thread you're in. When the agent needs something from three weeks ago — a decision, an error, the original plan — it goes back and looks instead of trusting the compaction.\n\nNothing changes on your end. Either tell Amp what you're looking for and let it find the thread, or give it a thread explicitly: paste a URL, or @-mention it. And when you open a new thread, hit Enter twice to reference the thread you just left.\n\nMention a thread and ask a question, just like before, except it now works with big threads too:", "url": "https://wpnews.pro/news/read-bigger-threads", "canonical_source": "https://ampcode.com/news/read-bigger-threads", "published_at": "2026-07-02 00:00:00+00:00", "updated_at": "2026-07-08 12:44:01.907745+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "ai-agents"], "entities": ["Amp", "GLM 5.2", "Gemini 3.5 Flash"], "alternates": {"html": "https://wpnews.pro/news/read-bigger-threads", "markdown": "https://wpnews.pro/news/read-bigger-threads.md", "text": "https://wpnews.pro/news/read-bigger-threads.txt", "jsonld": "https://wpnews.pro/news/read-bigger-threads.jsonld"}}