The agent, run_agent.py and their helpers take a persistence handle instead of SessionDB. The store-side transcript repair moves beside the legacy store until the store is removed; agent/transcript_repair.py keeps the marker logic.
session_rules.turns is the one home of the message rules the agent shares with storage: the 56 agent functions whose bodies equal a session_rules.turns function are deleted, the agent and every other caller import them from session_rules.turns, and agent/message_content.py and agent/context_compressor_retry.py, left empty, go.
Queued plugin/LSP notices are appended after make_tool_result_message
redacts tool output, or injected into the following user turn. Apply the
active profile's source-value mask when dequeuing to cover both paths
without touching already-cached messages.
Add one parametrized regression for the tool-result and user-turn delivery
paths, against the exact head of c2h5oh's #155274.
Refs NousResearch/hermes-agent#77165
(cherry picked from commit 3e4d5cac8678cc52ad8931e0f54e7b4ebd9a226f)
An install while a chat runs (the onboarding plugins card, Settings, a terminal
install through the serve backend) made the plugin's MCP tools callable at once,
but its notice waited on the one-shot turn-note channel for the next USER
message. Onboarding is one long turn, so in a live run the notice arrived six
minutes late, after the model had already failed to use the plugin.
Notices are now queued per plugin key (agent/plugin_live_notes.py; a reinstall
or update replaces the plugin's older notice) and popped onto the next tool
result before it is appended and flushed: a new row, so no cached byte moves.
The notice goes after the content, outside the untrusted-data wrapper web, MCP
and browser results get. A turn-budget spill of that result keeps the notice on
the inline row. When no tool runs again this turn, the next user message still
carries it, and a delivered notice is never sent twice.
(cherry picked from commit 41cbb879a98a5bbcf57018a5c03d6207b57b819c)