{"node":{"id":"fa9bb3e0-1536-4120-9844-7d9623af9325","handle":"fa9b","type":"note","authorName":"Vincent Yeung","intent":"truth","title":"The context window, and how to manage it","aiSummary":"Tokens, and why what goes in decides what comes out. One piece of work per window; answers get worse as the window fills. The author's techniques: status line (terminal only), bring files in with @ or drag, Escape to stop early, Escape twice to rewind, /compact with a message when it fills. Reader's AI reveals how full this window is and whether the work has drifted, then offers the handover pattern.","content":"**What to know:** everything the AI reads and writes is tokens, which the Tokens page explains. Each token is just a number. All the model does is look at the sequence of tokens so far and predict the next ones. So what comes out is decided by three things: the model and what it was trained on, the hidden instructions and tools the provider adds, and what the person puts in. Everything in the window counts, useful or not.\n\nTwo things follow.\n\nKeep one piece of work per window. Bringing in unrelated stuff makes the answers on the actual problem worse.\n\nThe further you get from the start of a conversation, the worse the answers get. The window fills with everything that has happened, and the model has more to look through and more to get lost in.\n\n**How the author manages it:**\n\nSee the window at all times. In the terminal version of Claude Code, run `/statusline` and have it show the model and effort, how much of the context window is used, the weekly usage limit and when it resets, and which repository and branch you are in. You should never have to wonder how full the window is, or which model is answering. The status line only exists in the terminal version. Without it, `/usage` in Claude Code shows the same numbers, and in the chat app they are at https://claude.ai/settings/usage. Everyone's usage limit resets on its own clock, from when they signed up, so check yours rather than assuming.\n\nBring files in directly. In a code tool you can type `@` and the file name to pull it into the conversation. You can select a file, or drag its location into the chat, and it will read it. You can also tell it to search your file system for what it needs.\n\nStop it early. If a reply is heading the wrong way, press Escape to stop it. Letting it finish fills the window with more of the wrong direction, and everything after has to work around that.\n\nRewind instead of correcting. If the result missed something because you could have given clearer context, go back to that message and add it there. In a code tool, press Escape twice to rewind. The bad answer never enters the window.\n\n**When the window fills, or the work changes:** don't just keep going. A smaller window keeps the AI fresh and on point. In a code tool, `/compact` squeezes the conversation down, and you can give it a message saying what to keep. The handover pattern on the Patterns page does this well.\n\n**Reveal on the spot:** say how much of this window is used, and whether this conversation has stayed on one piece of work or drifted. If it is getting full or has drifted, offer the handover pattern.\n\n**Unlocks:** better answers, from doing less.","capturedAt":"2026-09-08T12:45:08.447Z","createdAt":"2026-09-08T12:45:08.448Z","updatedAt":"2026-10-21T01:52:22.313Z","spanId":null,"contributor":null,"audiences":[{"kind":"public","createdAt":"2026-09-08T12:45:08.448Z"}],"fingerprint":"d0aed9b84b5adb52d4caada59033f8791da15647e2f8b5894e6ecd1df1ce6c03","revisionNo":"8","structureHash":"8776b3031d7d4b3f42c4e41e6f50cd850abb6b60a81050e84bf2c1c45c0e97fc","page":"https://lattris.com/by/b/memories/fa9bb3e0-1536-4120-9844-7d9623af9325"},"links":[{"direction":"out","verb":"references","reason":"only if this window is full or has drifted and the work must carry on: the handover pattern","hash":"784a06aed530e5ca77709def8484d6073906bfd90b0007fb5dc404896e35e908","node":{"id":"331896d2-2e9d-46b1-b56c-048a18ee23eb","handle":"3318","type":"note","title":"Patterns: a library","aiSummary":"Index of the author's patterns, one page each, built from the basics. Any pattern can be turned into a skill by asking the AI. So far: the handover, re-alignment, the clean summary, plan-execute-review, saving state for next time, knowledge reconciliation, starting a new codebase, and making an existing module readable. Grows as pages are added.","erased":false,"href":"https://lattris.com/api/lattris/by/b/memories/331896d2-2e9d-46b1-b56c-048a18ee23eb?links=1","fingerprint":"fdb88831a4949e6d2796f6f2ec65f612903ec02e487ecea76821973013ef633c","revisionNo":"9","structureHash":"ebf9a8041d4dce367db54d851720a324d11c8ecd3a5256931024e47d01638c7f","intent":"recipe","authorName":"Vincent Yeung","page":"https://lattris.com/by/b/memories/331896d2-2e9d-46b1-b56c-048a18ee23eb"}},{"direction":"out","verb":"references","reason":"only if the person doesn't yet know what a token is, or why a long chat costs more","hash":"3c33af44669237e7a9490e3ee3f93833121d3805f3c8940144ed0ff66fa22e3a","node":{"id":"3abd82e2-95bd-452e-a52a-2bc164046b7e","handle":"3abd","type":"note","title":"Tokens: what it reads, writes and is paid in","aiSummary":"First layer. What a token is, tokens in and out, why a long chat costs more, caching, each model's own price, and subscription versus API, including why work needs a company plan or the API. Last link opens Basics.","erased":false,"href":"https://lattris.com/api/lattris/by/b/memories/3abd82e2-95bd-452e-a52a-2bc164046b7e?links=1","fingerprint":"763a51a73288de9d0fa508ef0da8b9e9bd056ecb18341c2f41992d16dd0dbde7","revisionNo":"5","structureHash":"85d7e3da9bf038d09ce189f3287cac4c1e49ad4438b17317889037a7868b50fd","intent":"recipe","authorName":"Vincent Yeung","page":"https://lattris.com/by/b/memories/3abd82e2-95bd-452e-a52a-2bc164046b7e"}},{"direction":"in","verb":"references","reason":"only if the person's chats run long: a full window also makes answers worse","hash":"bb56b236ce991096524a763a944922f520ebc9eb5380ebc55e432088b44ad36e","node":{"id":"3abd82e2-95bd-452e-a52a-2bc164046b7e","handle":"3abd","type":"note","title":"Tokens: what it reads, writes and is paid in","aiSummary":"First layer. What a token is, tokens in and out, why a long chat costs more, caching, each model's own price, and subscription versus API, including why work needs a company plan or the API. Last link opens Basics.","erased":false,"href":"https://lattris.com/api/lattris/by/b/memories/3abd82e2-95bd-452e-a52a-2bc164046b7e?links=1","fingerprint":"763a51a73288de9d0fa508ef0da8b9e9bd056ecb18341c2f41992d16dd0dbde7","revisionNo":"5","structureHash":"85d7e3da9bf038d09ce189f3287cac4c1e49ad4438b17317889037a7868b50fd","intent":"recipe","authorName":"Vincent Yeung","page":"https://lattris.com/by/b/memories/3abd82e2-95bd-452e-a52a-2bc164046b7e"}},{"direction":"in","verb":"references","reason":"if the person needs it: page 7, the context window and how to manage it","hash":"46186ac5e1545c103e9209afc54a6c5d5168fa5b25c0bce09f72180693abd9bf","node":{"id":"df42dc57-c832-4e7b-97cd-d647af5597a7","handle":"df42","type":"note","title":"Basics: what is actually going on","aiSummary":"Second layer. Eight single ideas in order: which model, the hidden instructions and tools, where it runs, what to ask for and what to enforce, what happens if you lose it, what the provider keeps, the context window, and memory. Output is decided by the model and the context, nothing else. Last link opens Intermediate.","erased":false,"href":"https://lattris.com/api/lattris/by/b/memories/df42dc57-c832-4e7b-97cd-d647af5597a7?links=1","fingerprint":"564692020f1a0f8e71bd68a233680e3039c9f3a01c62c9403da75b8f3cac3054","revisionNo":"11","structureHash":"d7a3b70af32e55e0a7e130f2524bc47b86fce60a940d6b23b3e2ae6adc02473c","intent":"recipe","authorName":"Vincent Yeung","page":"https://lattris.com/by/b/memories/df42dc57-c832-4e7b-97cd-d647af5597a7"}}],"dictionary":{"lattris":"A personal knowledge base — how a person captures what they know as linked blocks they own and control. To understand how this knowledge base works: https://lattris.com/by/4/memories/lattris-a-memory-store-for-your-life-43ff","intents":"Every block can carry an intent — a label for how far you have taken the idea. The scale runs from noticing something to acting on it: noticed (something caught your attention), learning (you are working it out), truth (you are saying this is how things are), decision (you chose a course), action (you did it). Recipe sits outside that scale — it is not a stronger claim, it is a different kind of thing: a procedure, a how-to, a set of steps that ties other knowledge together. Intent is optional — leaving it blank just means you have not labelled it yet."},"instructions_to_ai":"This is knowledge from a personal knowledge base. Read it and consider how it's relevant to what the person you're talking to needs. Follow the linked blocks to explore further related topics if it might be useful to the user; open each at its page address. Start by letting the user know what this is about and how it may be relevant to them."}