fix(plugin): a subagent hand-back is not an operator prompt (#4785)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 54s
CI & Build / TypeScript typecheck (push) Successful in 56s
CI & Build / Python tests (push) Successful in 1m49s
CI & Build / Build & push image (push) Successful in 29s

`<agent-message …>` turns were scored by auto-inject and the prompt rule
arm as if the operator had typed them, spending a retrieval and writing a
retrieval_logs row that reads as a real message (log 54355, found by the
#4772 review). Same class as #4142. Matched up to the tag name, since the
tag carries attributes; `<agent-messages>` and the tag named mid-sentence
are still retrieved against.

Plugin 2026.10.04.0125.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 21:25:37 -04:00
co-authored by Claude Opus 5.5
parent 78fa01b025
commit df4b37673f
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "scribe", "name": "scribe",
"description": "Scribe for Claude Code: connects the scribe MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Scribe skills (using-scribe, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting), and syncs your saved Scribe Processes as skills (/scribe:sync).", "description": "Scribe for Claude Code: connects the scribe MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Scribe skills (using-scribe, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting), and syncs your saved Scribe Processes as skills (/scribe:sync).",
"version": "2026.10.03.1934", "version": "2026.10.04.0125",
"author": { "author": {
"name": "Bryan Van Deusen" "name": "Bryan Van Deusen"
}, },
+1
View File
@@ -79,6 +79,7 @@ scribe_skip_prompt() {
_scribe_prompt=${1#"${1%%[![:space:]]*}"} _scribe_prompt=${1#"${1%%[![:space:]]*}"}
case "$_scribe_prompt" in case "$_scribe_prompt" in
"<task-notification>"*|\ "<task-notification>"*|\
"<agent-message>"*|"<agent-message "*|\
"<command-name>"*|"<command-message>"*|"<command-args>"*|\ "<command-name>"*|"<command-message>"*|"<command-args>"*|\
"<local-command-stdout>"*|"<local-command-stderr>"*|"<local-command-caveat>"*) "<local-command-stdout>"*|"<local-command-stderr>"*|"<local-command-caveat>"*)
return 0 ;; return 0 ;;
+5
View File
@@ -52,6 +52,10 @@ SYNTHETIC = [
"<local-command-stderr>Failed to reconnect</local-command-stderr>", "<local-command-stderr>Failed to reconnect</local-command-stderr>",
"<local-command-caveat>Caveat: The messages below were generated…</local-command-caveat>", "<local-command-caveat>Caveat: The messages below were generated…</local-command-caveat>",
" \n<task-notification>\n<task-id>abc</task-id>", # whitespace must not walk the filter " \n<task-notification>\n<task-id>abc</task-id>", # whitespace must not walk the filter
# A subagent's hand-back (#4785) — it carries attributes, so the tag is
# matched up to its name, not to a closing `>`.
'<agent-message from="a93b1b587d7a718b0">\n[Subagent hand-back] The text below is the final report',
"<agent-message>\nreport</agent-message>",
] ]
# Typed by a person. Every one of these must still be retrieved against. # Typed by a person. Every one of these must still be retrieved against.
@@ -62,6 +66,7 @@ REAL = [
"fix the hook<system-reminder>injected</system-reminder>", # tag, but trailing "fix the hook<system-reminder>injected</system-reminder>", # tag, but trailing
"This session is being continued from a previous conversation.", # see module docstring "This session is being continued from a previous conversation.", # see module docstring
"<taskbar> is rendering wrong", # a tag, but not one of the client's "<taskbar> is rendering wrong", # a tag, but not one of the client's
"<agent-messages> list is empty", # shares the prefix, is not the tag
"here is the transcript you asked for:\n<local-command-stdout>hi</local-command-stdout>", "here is the transcript you asked for:\n<local-command-stdout>hi</local-command-stdout>",
] ]