Docs · Sessions
Attach code context
Before running a session, Zero needs to know which files are relevant. Attaching code context tells the AI where to look.
Automatic context
Zero tries to detect relevant files from the problem description. It searches the repo for filenames, function names, and error messages mentioned in the problem statement. Automatic detection works best when the problem description is specific — include file names, function names, or error strings when you know them.
Manual context
Open the Memory tab on the Work item, click Code context, then select files from the workspace file tree. Selected files are stored in code-context.mdinside the Work item's memory folder.
Manual context overrides automatic detection. If both exist, manual context takes precedence.
Adding file paths
Paste file paths directly into code-context.md — one path per line, relative to the workspace root. Zero reads this file at session start and loads the listed files into the session context.
The code-context.md file
Format: a # Files section with one path per line, and an optional # Scopesection describing what to focus on or ignore.
# Files
src/auth/jwt.rs
src/auth/refresh.rs
tests/auth_integration_test.rs
# Scope
Focus on JWT expiry and refresh token handling.
Ignore rate limiting and session management.Best practices
- Link to affected files, not the whole repo — more context is not always better.
- Include test files if the bug is in tests or test coverage is the goal.
- Include config files if the issue is environment or config-related.
- For epics or greenfield Work, include the architecture doc or spec file as context.
- Omit generated files,
node_modules, and build artifacts — they add noise.