mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
Slash commands run on the event-loop thread, outside the per-turn contextvars.copy_context() that pins the session cwd for the agent call. /compress reaches agent._build_system_prompt(), whose "Current working directory" line comes from resolve_agent_cwd() — so an unpinned handler rebuilt the prompt against the Hermes install tree and PERSISTED it as the session's cached prompt, re-poisoning every later turn even though the turn itself is now pinned. Pin inside a fresh context copy so the write cannot leak into other concurrent ACP sessions on the shared loop and needs no teardown. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| auth.py | ||
| edit_approval.py | ||
| entry.py | ||
| events.py | ||
| permissions.py | ||
| provenance.py | ||
| server.py | ||
| session.py | ||
| tools.py | ||