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 docs: purge stale xdist/_enforce_test_timeout test-runner references repo-wide 2026-07-29 23:16:18 -07:00
adding-tools.md
agent-loop.md
architecture.md Revert "remove Vercel AI Gateway and Vercel Sandbox (#33067)" 2026-07-29 19:48:37 -07:00
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 feat(runtime)!: require Node 26 across all installers, heal, and upgrade paths 2026-08-01 21:17:51 -04:00
creating-skills.md
cron-internals.md
desktop-plugin-sdk.md
egress-internals.md
extending-the-cli.md
gateway-internals.md docs: sync overnight sweep with registry, gateway, curator, cron 2026-07-29 09:45:11 -07:00
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 Revert "remove Vercel AI Gateway and Vercel Sandbox (#33067)" 2026-07-29 19:48:37 -07:00
secret-source-plugin.md
session-storage.md perf(state): add messages(session_id, id) index for window/ordering queries 2026-08-02 21:16:17 +05:30
subagent-lifecycle-api.md
tools-runtime.md Revert "remove Vercel AI Gateway and Vercel Sandbox (#33067)" 2026-07-29 19:48:37 -07:00
trajectory-format.md
video-gen-provider-plugin.md
web-search-provider-plugin.md
worktree-ui-dev.md