Hermes plugin: @url/@file attachments and tool-call arguments are still retained as the user's own words (follow-up to #6818)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 53/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- ai-infra-agents
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 45.2k
- Fork
- 5.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vectorize-io/hindsight
-
core
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vectorize-io/hindsight#7254 ·
-
Control Plane shows different calendar dates for the same occurrence in Constellation and TimelineApertacore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
vectorize-io/hindsight#7240 · 1 commento ·
-
core
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vectorize-io/hindsight#7233 ·
-
core
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
vectorize-io/hindsight#7231 ·
-
Flaky system test: test_embedding_and_rerank_calls_are_in_request_history raises StopIterationApertacore
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
vectorize-io/hindsight#7228 · 1 commento ·
Tutte le issue di vectorize-io/hindsight
Issue simili
-
Test: to_hijri() accepts datetime.datetime and uses only the date partForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertagood first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresForse già presa @AshutoshSingh840 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
UKGovernmentBEIS/control-arena#992 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
mvalentsev/awesome-free-ai-coding#70 ·
I maintainer di solito rispondono entro 1 giorno