Hermes plugin: @url/@file attachments and tool-call arguments are still retained as the user's own words (follow-up to #6818)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- ai-infra-agents
Research direction
Start with the Hermes plugin’s _build_turn_messages, _stub_attached_context, and _format_arguments, then check how on_pre_compress builds checkpoint messages. The issue reports 270 plugin tests passing with a local fix, but does not name the test files. Reproduce the extraction behavior with the stated payloads; done means attached content is not attributed to the user and tool-call arguments do not retain paths or commands.
Written by the indexing model from the issue text.
Description
What happens
Follow-up to #6818, on Hermes plugin 2.0.0 with server 1.3.0. Two kinds of content still end up stored as the user's own words and actions.
1. @url: / @file: attachments are retained as the user's message. Hermes expands context references into the user message itself: agent/context_references.py appends --- Attached Context --- followed by one block per reference (🌐 @url:… (N tokens), 📄 @file:…, 📁, 📌, 🧾). sync_turn receives that expanded text as user_content, and _build_turn_messages sends it as User: …. Extraction then treats the attached page's first person as the user speaking. The #6818 note doesn't help here, because it only covers the tool message: this content arrives inside the user's own message.
Repro: attach the transcript of the video from #6818 (@url:https://www.youtube.com/watch?v=r0Mm_79yKso) with the message "audit this problem on our setup". Then call dry-run-extract on the payload the plugin builds, with its default context plus the relayed note. In my bank this returned 22 facts. About 20 of them gave the video creator's life to the user: "User's VPS runs 2 cores / 4 GB", "User tested space bunny", "User modified the Hindsight plugin", "User plans to keep using Hindsight".
2. The tool-call lines added in 2.0.0 produce facts about the agent's working files. _format_arguments sends key=value for every argument, cut to 120 characters. Extraction turns these into facts like "User's scratch directory is ~/.hermes/cache/scratch/fl" and "User's Hermes agent uses ~/.hermes/hermes-agent/venv/bin/python". In one bank, facts naming such paths went from 1.3% of new facts (144/11,228, 30 days before upgrading) to 6.3% (86/1,369, after).
What I measured (dry-run-extract, nothing stored)
| Payload | Facts | Attached content credited to the user |
|---|---|---|
| Current plugin payload | 22 | ~20 |
+ an attribution rule in retain_custom_instructions |
23 | ~20 |
Attachment moved to its own attachment role + context note |
23 | ~8 |
| Attachment replaced by a one-line reference | 2 | 0 (and −85% input tokens) |
This matches your finding in #6818 that hints in context or instructions don't override the narrator rule. Removing the content is the only fix I found that works on the plugin side.
Side finding: the extraction model matters more than the prompt. On 14 real chunks from agent sessions (2 runs each, same bank config), facts crediting the agent's own work to the user ("User researched/ran/found…") went from 13/25 of user-attributed facts on claude-haiku-4-5 to 4/11 on claude-haiku-5-5. Rewording the mission or custom instructions changed nothing measurable (5–8 vs 6–8).
Suggested fix (what I run locally, 270 plugin tests pass)
_stub_attached_context(user_content)in_build_turn_messages(and on user messages in theon_pre_compresscheckpoint). Keep the user's typed text, drop--- Context Warnings ---, and replace everything after--- Attached Context ---with[The User attached @url:…, @file:…; its content was written by its own author and is not retained here.]. The reference names come from the block header lines. Aretain_attached_contextsetting (defaultfalse) turns this off._format_argumentskeeps onlyhttps?://addresses found in the arguments (de-duplicated, at most 3), so a line readsTool call: web_fetch(https://…)orTool call: terminal(). Fetch provenance is kept, and paths, commands and file bodies are dropped.
Hermes core already strips the same block for session titles (agent/title_generator.py, _CONTEXT_FOOTER_RE), so a core-side option would also work: pass the unexpanded message (ContextReferenceResult.original_message) to memory providers.
Environment: Hermes Agent (current main), hindsight-hermes 2.0.0, Hindsight server 1.3.0 (Docker), retain on claude-haiku-4-5 through an OpenAI-compatible proxy.
- Dominant language
- Python
- Stars
- 45.2k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vectorize-io/hindsight
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#7254 ·
-
Control Plane shows different calendar dates for the same occurrence in Constellation and TimelineOpencore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vectorize-io/hindsight#7240 · 1 comment ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vectorize-io/hindsight#7233 ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
vectorize-io/hindsight#7231 ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
vectorize-io/hindsight#7228 · 1 comment ·
All issues in vectorize-io/hindsight
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day