co-mono/packages/coding-agent/src/core
Aliou Diallo a9a1a62b14
fix(coding-agent): prevent global AGENTS.md from being loaded twice (#239)
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.
2025-12-19 15:24:49 +01:00
..
custom-tools Forward onUpdate callback through hook wrapper (#238) 2025-12-19 15:23:41 +01:00
hooks Forward onUpdate callback through hook wrapper (#238) 2025-12-19 15:23:41 +01:00
oauth GitHub Copilot: auto-enable models, fix gpt-5 API, normalize tool call IDs 2025-12-15 20:06:11 +01:00
tools Expose full tool result content and details in hook tool_result event 2025-12-19 00:42:08 +01:00
agent-session.ts Check for compaction before prompt submission, not just after agent turn 2025-12-17 22:25:20 +01:00
bash-executor.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
compaction.ts Simplify compaction: remove proactive abort, use Agent.continue() for retry 2025-12-09 21:43:49 +01:00
export-html.ts feat: add line number display to HTML export for read tool calls 2025-12-10 22:05:14 +01:00
index.ts Custom tools with session lifecycle, examples for hooks and tools 2025-12-17 16:03:23 +01:00
messages.ts Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/ 2025-12-09 00:51:33 +01:00
model-config.ts Add GitHub Copilot support (#191) 2025-12-15 19:05:17 +01:00
model-resolver.ts feat: initial impl 2025-12-14 17:18:13 -05:00
session-manager.ts Release v0.22.5 2025-12-17 01:22:13 +01:00
settings-manager.ts Custom tools with session lifecycle, examples for hooks and tools 2025-12-17 16:03:23 +01:00
skills.ts Skills standard compliance 2025-12-19 00:11:39 +01:00
slash-commands.ts fix(coding-agent): support symlinked slash commands in discovery 2025-12-18 23:57:54 +01:00
system-prompt.ts fix(coding-agent): prevent global AGENTS.md from being loaded twice (#239) 2025-12-19 15:24:49 +01:00