a9a1a62b14
When cwd is `~/.pi/agent/` or a subdirectory, the global AGENTS.md file was included twice in the system prompt. `loadProjectContextFiles()` loads context files in two steps: 1. Explicitly loads from `getAgentDir()` (`~/.pi/agent/`) 2. Walks from cwd up to root, collecting all AGENTS.md/CLAUDE.md files There was no deduplication. When cwd is at or below `~/.pi/agent/`, the ancestor walk includes that directory again. Fix: track seen paths with a Set and skip duplicates.