Filesystem
Also called File system · Working directory
The directory tree the agent reads, edits and runs inside; for a coding agent, the main part of the environment.
The filesystem is the directory tree the agent can see: the repo you launched it in, its files, and usually its parent folders if you let it wander. For a coding agent, this is most of its environment. Reading a file, editing a file, listing a directory and searching for a string are all tool calls against the filesystem, and the results are the agent's only view of your code.
Two things follow. First, the agent only knows what it has read. A 4,000-file monorepo is not 'in' the context window; the handful of files the agent chose to open are. When it edits a function without opening the callers, the callers were simply never in its world. Second, anything on disk is fair game as input: a stray .env, a giant node_modules folder, an old TODO file. Search tools will find them and the agent may act on them.
Keep the tree tidy where it matters. A clear folder layout and a short AGENTS.md pointing at the right entry points do more than any clever prompt. Ignore files (.gitignore, plus tool-specific ignore lists) keep build output and secrets out of searches. When you launch the agent, launch it from the directory you actually want it to treat as the world, not from your home folder.
- Claude CodeFile tools are scoped to the launch directory by default, and it asks before touching paths outside it.
- Cursor
.cursorignorehides paths from indexing and search; most other harnesses lean on.gitignorefor the same job. - Claude CoworkThe filesystem is only the folders you explicitly share with it.
“Why did it rewrite the API client in packages/legacy? Nobody uses that.”
“Search matched there first, so that's the file it read. It has no idea which package is live unless something in the filesystem says so.”
“Adding a one-line README to legacy and an ignore rule for it now.”
Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.
Start Course 01 →