Skip to content

fix(acp): use session cwd for project context discovery#11570

Open
cola-runner wants to merge 2 commits into
NousResearch:mainfrom
cola-runner:codex/fix-11515-acp-context-cwd
Open

fix(acp): use session cwd for project context discovery#11570
cola-runner wants to merge 2 commits into
NousResearch:mainfrom
cola-runner:codex/fix-11515-acp-context-cwd

Conversation

@cola-runner

Copy link
Copy Markdown
Contributor

Summary

  • pass the ACP session cwd into AIAgent so project context discovery uses the same workspace as ACP tool execution
  • invalidate the cached system prompt when an ACP session changes cwd so context files are rebuilt from the new workspace
  • initialize ACP subdirectory hint tracking from the explicit session cwd and add regression coverage for both the agent and session manager paths

Closes #11515

Testing

  • source venv/bin/activate && python -m pytest tests/run_agent/test_run_agent.py -q -k 'TestBuildSystemPrompt'
  • source venv/bin/activate && python -m pytest tests/acp/test_session.py -q
  • source venv/bin/activate && python -m pytest tests/ -q

Full suite note

The full suite still fails in this environment on existing unrelated tests and missing optional deps (acp, fastapi), plus current gateway/Discord/transcription failures. The ACP and run_agent coverage for this change passed locally.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/acp Agent Communication Protocol adapter comp/agent Core agent loop, run_agent.py, prompt builder labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ACP session cwd is used for tool execution but not for project context file discovery

2 participants