

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: What Is Context?
incomplete
2: Context As RAM
incomplete
3: New Sessions
incomplete
4: Token Economics
incomplete
5: Ignoring Files
incomplete
6: File Watcher
incomplete
7: Lost in the Middle
incomplete
8: Compaction
incomplete
9: Configure Compaction
incomplete
10: Undo and Redo
incomplete
11: Forking
incomplete
12: Secrets in Context
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
A great way to bloat context is to let OpenCode read giant chunks of noisy, irrelevant files.
OpenCode's content searches use ripgrep, which respects .gitignore patterns by default. This keeps ordinary searches from getting blasted by node_modules/ or dist/ folders. That said, explicit file patterns can override those exclusions, and the agent can still read ignored files directly if needed.
You don't really need anything AI-specific here. Just make sure you actually .gitignore generated files and dependencies like you normally would:
dist/, build/, generated assets)node_modules/, .venv/)You might want OpenCode searches to include a path covered by .gitignore, or to exclude a path without changing which files Git tracks. To override ripgrep's default search behavior, create a .ignore file in your project root:
!dist/
fixtures/xl-dump.json
The ! pattern re-includes dist/ in search results, while the regular pattern excludes fixtures/xl-dump.json.
Tell OpenCode to add the Sloperator playground's logs/ directory to .gitignore and uv.lock to .ignore (so Git can still track it).
Then tell OpenCode to run and submit the CLI tests from the project root.