hermes-agent/website/docs/developer-guide
Teknium 971d81f892 fix(agent): isolate the pooled compression worker from the live transcript (review F3)
The pooled worker closure captured the caller's live `messages` list and
compress_context explicitly supports plugin/legacy context engines that
mutate that list in place — so after a host timeout, a late engine could
rewrite the live conversation (roles, ordering, persisted content)
concurrently with the resumed turn.

The worker now deep-snapshots the transcript on the worker thread before
any engine code runs; the caller's list object is never handed to pooled
code. Results reach caller-visible state only through the returned value
of an ADMITTED commit (the host discards results on timeout/cancel), and
durable SessionDB mutation was already gated behind the commit fence.
No-op passes map the unchanged snapshot back to the caller's original
list so identity-based no-op detection and flush dedup keep working.

Document the thread-safety contract for context-engine and
memory-provider extension points (they now run on pooled threads) in the
module docstring and the context-engine plugin guide.

Regression: an in-place-mutating engine plus host timeout proves the
caller's live transcript is byte-identical WHILE the worker is still
blocked inside the engine (released only after the assertions).

PR #76354 review, blocking finding 3 / merge gate 3.
2026-08-02 16:16:36 -07:00
..
plugins
_category_.json
acp-internals.md
adding-platform-adapters.md
adding-providers.md
adding-tools.md
agent-loop.md
architecture.md
browser-provider-plugin.md
browser-supervisor.md
context-compression-and-caching.md
context-engine-plugin.md fix(agent): isolate the pooled compression worker from the live transcript (review F3) 2026-08-02 16:16:36 -07:00
contributing.md
creating-skills.md
cron-internals.md
desktop-plugin-sdk.md
egress-internals.md
extending-the-cli.md
gateway-internals.md
image-gen-provider-plugin.md
memory-provider-plugin.md
model-provider-plugin.md
plugin-llm-access.md
programmatic-integration.md
prompt-assembly.md
provider-runtime.md
secret-source-plugin.md
session-storage.md
subagent-lifecycle-api.md
tools-runtime.md
trajectory-format.md
video-gen-provider-plugin.md
web-search-provider-plugin.md
worktree-ui-dev.md