Inherent Context: Zero-Token Context Through File System Design

· 5 min read ai harness-engineering

TL;DR: Inherent context uses pre-trained model knowledge and file system structures to guide agent behavior without adding tokens. By organizing codebases intentionally—using mono-repo patterns, meaningful paths, and procedural policies—you can influence how agents understand and work with your project more effectively than prompting.

What Is Inherent Context?

When we first started working with AI agents, we shoved context down their throats via system prompts, skills, and tools. But there’s a more elegant solution: inherent context—using existing programmatic structures to influence agent behavior without impacting the context window.

Unlike tools or skills (what the video calls “extrinsic context”), inherent context relies on the LLM’s pre-training and structural expectations. It must be:

  • Non-invocable: Not a tool the agent has to “learn” to use
  • Git-trackable: Exists within the file system and environment
  • Minimally Invasive: Provides maximum semantic value with minimal token footprint

The Mono-Repo Advantage

Lock files and config files in your root directory tell a story the agent already understands. When the agent sees yarn.lock, it knows this is a JavaScript project. It sees Cargo.toml and understands Rust. These files are:

  • Executable: They don’t change how code runs
  • Informative: They signal project type and dependencies instantly
  • Contextual: They allow you to organize multiple projects in one repo

Even if you’re not coding—using agents for other tasks—a mono-repo structure lets you separate contexts. You can talk about the UI in one folder and the API in another, and the agent adjusts automatically.

Path as Meaning

The path structure tells the agent what something is:

client/components/button.tsx → UI component
videos/ad-copy.txt → Video-related content
scripts/data-processing.py → Data processing script

When the agent uses bash to search, it’s looking for keywords. If you name files descriptively (like big-foo vs small-foo instead of foo-v2), the agent can distinguish between them without reading contents.

You can also use meta-files like meta.json with aliases:

{
"aliases": {
"v3": "legacy",
"temp": "archive"
}
}

The agent sees archive-v3-temp.js and understands exactly what it is—no mistaking it for the current version.

Path as Policy

More powerful than naming: using hooks and procedural locks to enforce rules without prompt injection. Examples:

  • Write limits: After N writes to a folder, trigger a lock requiring refactoring
  • Size gates: If a file exceeds 500 lines, prompt the agent to split it
  • State management: Track if a file was edited after being read (like Cursor’s policy)
  • Keyword triggers: Detect session keywords and prompt the agent accordingly

The agent is terrible at following rules over long periods. Instead of relying on it to remember, create programmatic policies that enforce behavior automatically.

Virtual Trees

For document-based systems with many markdown or JSON files, virtual file trees let the agent use standard bash commands to find what it needs. This is especially powerful when:

  • Data is already executable (JSON that parses directly to objects)
  • The agent can access data without connecting to external runtimes
  • You can encode data in formats the model handles efficiently

Rethinking agent.md

The infamous agent.md file gets a bad rap. Studies show that putting agent.md in every folder leads to poor performance—it’s too much to manage. But the video proposes a better use: temporal change logs.

When you return to a codebase after time, you lose the context of what changed. Using agent.md as a changelog that records:

  • Files that were modified
  • Files that used to exist
  • Git hashes and timestamps

This gives the agent temporal awareness without requiring it to read the entire git history.

The Bigger Picture

The goal of building better agent harnesses isn’t always more information—it’s better structure. If you can solve context through systems you already use, it improves every codebase using Claude Code, Cursor, or similar tools.

The challenge: find something inherent that works with existing structures. It will reduce token counts and improve performance. That’s the opportunity.


References

  1. The Context That Costs Zero Tokens — Shane Murphy (April 17, 2026) — https://www.youtube.com/watch?v=KTob5CZbx0k

This article was written by Claude (Claude 3.7 Sonnet | Anthropic), based on content from: https://www.youtube.com/watch?v=KTob5CZbx0k