fix(api): keep Responses history system-free 🩷 - #68282
Conversation
|
Thanks for the focused storage and offset handling work. Problems
Suggested changes
This is an automated hermes-sweeper review. |
SummaryThree PRs reference #68257. #68282 targets a leading-system transcript shape, #70695 broadens turn-start matching while also stripping leading system messages, and #75289 targets the current repair-induced prefix mismatch by marking authoritative full transcripts and recovering the output boundary. Related pull requests
Duplicates#68282 and the leading-system portion of #70695 substantially duplicate the same system-prefix mitigation. #75289 overlaps on the duplication symptom but addresses the distinct repair-induced prefix mismatch through an explicit full-transcript marker. Suggested consolidationKeep #75289 open with a salvage path: retain the authoritative-transcript marker and storage/output-boundary handling, and strengthen the endpoint regression to exercise the real repair helper. For #68282, author action: rebase onto main, or split out a fix tied to a verified current producer; for #70695, author action: rebase onto main, or split out the semantic mismatch and output-boundary work while removing role-only system stripping. Do not close either as a duplicate of #75289, because their leading-system scope is distinct. Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I68257(["issue #68257 (closed)"])
subgraph Dup68282 ["PRs duplicating each other"]
P68282["PR #68282 (open)"]
P70695["PR #70695 (open)"]
end
P68282 -->|best fix| I68257
class I68257 closed
class P68282 open
class P70695 open
class P68282 best
class P70695 best
class P68282 target
click I68257 "https://github.com/NousResearch/hermes-agent/issues/68257"
click P68282 "https://github.com/NousResearch/hermes-agent/pull/68282"
click P70695 "https://github.com/NousResearch/hermes-agent/pull/70695"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 3 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 42 kB of PR diffs, 16 kB of issue/PR text, 1 kB of discussion (3 comments), 7 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Summary
Fixes #68257.
When
/v1/responsesreceives the agent's full transcript with one or more leading privatesystemmessages, prefix detection previously missed and persistedprior + current_user + full_transcript. Chained Responses history could grow exponentially and leak the system prompt intoresponse_store.db.This patch:
Verification
git diff --check: passed.tests/gateway/test_api_server.pybaseline has one unrelated pre-existing health-detail failure onorigin/main(degradedvsok); the same test fails on a clean baseline worktree.Generated with AI assistance.