Repository context includes more than the file being edited. A coding agent may need nearby modules, interfaces, tests, package configuration, generated-file boundaries, current changes, commit history, project instructions, and search results that reveal how a behavior is used elsewhere.
Context should be gathered according to the task rather than loaded indiscriminately. Focused search and direct inspection reduce token use and stale assumptions while preserving the authoritative relationships needed to make a safe, compatible change.
ELI5
Repository context is the collection of project information needed to understand a software change correctly. It can include nearby code, tests, configuration, documentation, project rules, current edits, and the places where a function is used.
For example, changing one button may also require checking a shared style file, an accessibility test, and another page that reuses the same component. Gathering the relevant context helps a coding agent avoid a change that works in one file but breaks the wider project.
How does a coding agent gather repository context?
It can inspect project instructions, search symbols and text, read related files, check version-control state, and run relevant diagnostics.
Why not store all repository context in permanent agent memory?
Repositories change frequently, so copied context becomes stale and is often less reliable than targeted inspection of the current source.










