Free tools Windows power users keep installed
One-click scans. No signup required.
For AI coding agents, the hard part is often not producing code but keeping the right engineering context available as work continues. A finite context window must accommodate prompts, replies, tool calls and results, and system instructions. Meanwhile, project knowledge stored for later can go stale as code, conventions, and branches change. Repository instructions and memory features can help carry context forward, but they are guidance—not a guarantee that an agent will follow it or produce a correct change.
Two different problems get called “context loss”
In-session capacity
A coding agent’s working context is larger than the text a developer types. GitHub says Copilot CLI’s context window includes messages, responses, tool calls and results, and system instructions; its size varies by model. Long or complex sessions can fill that finite window. When that happens, relevant earlier details may no longer be available in the same way.
As an Amazon Associate I earn from qualifying purchases.
For Copilot CLI, use /context to inspect active model and token-usage categories, including the system prompt, instructions, tools, messages, free space, and buffer. Tool output can also consume substantial context. GitHub notes that large responses may be saved to a temporary file, with a preview provided to the model by default. These are Copilot CLI behaviors, not universal features of coding agents. GitHub Copilot CLI context management
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteDurable knowledge and freshness
Putting a convention in a file or memory system can make it available beyond one conversation, but storage does not make it permanently true. A rule may change, an implementation may be replaced, or an observation may apply only to an abandoned branch. GitHub’s discussion of Copilot’s memory system identifies keeping stored knowledge valid as code evolves across branches and time as a central challenge.
#1 Best Overall
As Tiferet Gazit, author of GitHub’s January 15, 2026 article on the system, put it: “The core challenge for memory systems isn’t about information retrieval, but ensuring that any stored knowledge remains valid as code evolves across branches and time.” GitHub’s article on building an agentic memory system
How repository instructions help
Repository instructions let a team provide recurring project knowledge without repeating it in every prompt. Useful material includes conventions that are not obvious from the code alone: naming rules, architectural patterns, security expectations, error handling, documentation standards, and how to run or test the project. OpenAI describes AGENTS.md as a way for people to give an agent instructions or tips for working in a repository, such as coding conventions, code organization, and test commands. OpenAI’s Codex launch documentation
Keep broad, durable rules in repository-wide instructions. Move requirements that apply only to a directory, file pattern, or particular workflow into narrower guidance where the selected agent supports it. This reduces the chance that every task carries details irrelevant to the files being changed, while making targeted requirements easier to find.
Recommended Free Tools
File names and discovery behavior depend on the agent harness. VS Code documents .github/copilot-instructions.md or AGENTS.md for Copilot, CLAUDE.md for Anthropic Claude, and AGENTS.md for OpenAI Codex. Whether a file is loaded depends on the selected harness and feature; a familiar filename is not a cross-tool guarantee. Check the current product documentation for the setup you use. VS Code custom instructions
Rank #3
Choose the right place for each kind of context
| Mechanism | Best fit | Trade-off to manage |
|---|---|---|
| Repository-wide instructions | Durable conventions and architecture that apply across most of the project | Keep them concise and current; broad instructions can consume attention even when a task does not need every detail |
| Path-specific instructions | Rules that apply to a particular directory or file pattern | Multiple files need clear ownership and consistent updates |
| Task-specific prompts or instructions | Requirements for a particular task or interaction | They must be supplied when relevant and do not automatically become durable project knowledge |
| Persistent or cross-agent memory | Information intended to travel across sessions or workflows | Remembered facts need review as code and branches change; availability and behavior vary by product |
GitHub describes repository custom instructions as a way to give Copilot project context automatically, and its documentation covers path-specific instructions to avoid overloading repository-wide guidance. VS Code also documents attaching instructions by file pattern or task relevance and reusable prompt files for particular interactions. GitHub Copilot custom instructions · VS Code custom instructions
Keep the context useful instead of accumulating it
Anthropic’s guidance for Claude Code treats CLAUDE.md as a lean, living onboarding document: update it when conventions change, remove stale material, and avoid filling it with full API documentation or facts already obvious from the file tree. That is product-specific advice, but the underlying maintenance problem applies to any context file: more content is not automatically better if it is outdated, duplicated, or irrelevant. Anthropic Help Center guidance on CLAUDE.md and prompts
Rank #4
- Write instructions as actionable project guidance, not a second copy of the codebase.
- Assign an owner or review point for conventions that can change.
- Remove rules that no longer match the current architecture or development workflow.
- Prefer narrow scope for requirements that only apply to specific paths or tasks.
What current evidence says—and does not say
A 2026 exploratory study examined configuration mechanisms in 2,926 GitHub repositories and covered Claude Code, GitHub Copilot, Cursor, Gemini, and Codex. Its abstract reports that context files dominate the configuration landscape and that AGENTS.md is emerging as an interoperable standard. That number describes the study’s repository sample; it does not measure how often agents lose context or show that context files cause better code or fewer errors. Harness Engineering for Agentic AI Coding Tools: An Exploratory Study
The reviewed product documentation and study do not establish a general rate for context loss or quantify its engineering cost. Nor do they establish a universal best instruction format. Practical comparisons should consider which harnesses discover a format, how narrowly guidance can be scoped, who keeps it current, how much context it consumes, whether it carries across sessions or agents, and how the result will be checked.
Validate the change, not just the instructions
Instructions can improve the context an agent receives, but they do not enforce behavior. GitHub cautions that Copilot may not follow custom instructions exactly the same way every time. Treat the files as useful guidance, then review the proposed change against the current code and run the project’s relevant checks—such as tests, linters, or type checks—before relying on it. GitHub Copilot custom instructions
As of January 15, 2026, GitHub described Copilot cross-agent memory as a public preview, initially available to coding agent, CLI, and code review on paid Copilot plans, off by default and opt-in. Product availability can change, so check GitHub’s current announcement before depending on that feature. GitHub’s Copilot memory announcement
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




