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.
1 line
10 B
Text
1 line
10 B
Text
kerpopule
|