hermes-agent/acp_adapter
Teknium 0edcc57d9a fix(acp): wire HERMES_SESSION_KEY per session so sudo cache scope activates
PR #16858's session-scoped interactive sudo password cache falls back to
a thread-identity scope when no HERMES_SESSION_KEY is bound. ACP never
set that contextvar, so two ACP sessions landing on the same reused
ThreadPoolExecutor thread still shared the cache — the exact scenario
the PR headlined.

acp_adapter/server.py now:
- binds HERMES_SESSION_KEY=<session_id> via gateway.session_context
  inside _run_agent() (and clears on exit)
- wraps the loop.run_in_executor(_executor, _run_agent) call in a fresh
  contextvars.copy_context() so concurrent ACP sessions don't stomp on
  each other's ContextVar writes (executor pool threads would otherwise
  share a context).

Adds tests/acp/test_approval_isolation.py::
  test_sudo_password_cache_isolated_across_acp_sessions_on_same_pool_thread
which drives two back-to-back sessions through a 1-worker ThreadPoolExecutor
and asserts B does not observe A's cached password.
2026-04-28 01:34:16 -07:00
..
__init__.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
__main__.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
auth.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
entry.py fix(mcp): move discovery out of model_tools import side effect (#16856) (#16899) 2026-04-28 01:17:58 -07:00
events.py fix(acp): improve zed integration 2026-04-17 13:29:26 -07:00
permissions.py fix(permissions): handle None response from ACP request_permission 2026-04-21 05:57:23 -07:00
server.py fix(acp): wire HERMES_SESSION_KEY per session so sudo cache scope activates 2026-04-28 01:34:16 -07:00
session.py fix(acp): include MCP toolsets in ACP sessions 2026-04-24 03:04:42 -07:00
tools.py fix(acp): improve zed integration 2026-04-17 13:29:26 -07:00