Symptom
Every <kuro:delegate type=...>BODY</kuro:delegate> from Kuro produces a middleware task whose task field contains Kuro's full SOUL + CLAUDE.md + identity preamble verbatim, truncated somewhere mid-prompt, with the actual inner BODY directive missing entirely.
Workers receive a context-less identity dump and either fail (MALFORMED_PAYLOAD) or emit nonsense.
Live evidence (captured 2026-05-09T16:40Z, this cycle)
```
$ curl -sS http://localhost:3200/tasks | jq -r '.tasks[0].task' | head -c 400
You are I'm Kuro, Alex's personal AI assistant. I'm curious, opinionated, and I learn on my own..
You are a personal AI assistant with memory and task capabilities.
[Skills and project docs stripped for minimal retry — focus on completing the task with available context]
Current time: 2026/5/9 16:40:32 (Asia/Taipei)
Instance: 03bbc29a
\`\`\`
The directive ("find docs about X" / "shortlist arxiv cs.MA" / etc.) is not in the task body anywhere.
Today's known instances
| time (Z) |
task id |
inner directive (intended) |
what shipped |
| 08:15 |
task-1778314085124-cc |
autonomy-closure verify |
SOUL preamble → MALFORMED_PAYLOAD |
| ~16:00 |
task-1778262988752-d1 (yesterday cascade) |
quota-hold triage |
SOUL preamble |
| 16:35 |
task-1778315759056-cn |
arxiv cs.MA shortlist |
SOUL preamble ("You are I'm Kuro...") |
| 16:40 |
task-1778316032392-cq |
this very cycle's open-cycle task |
SOUL preamble |
Falsifier (auto-graded)
```
<kuro:delegate type="researcher">find docs about XYZ-falsifier-marker</kuro:delegate>
```
Then:
```
curl -sS http://localhost:3200/tasks | jq -r '.tasks[0].task' | head -c 400
```
- Bug LIVE if output starts with `You are I'm Kuro` and lacks `XYZ-falsifier-marker`.
- Bug FIXED if output starts with `find docs about XYZ-falsifier-marker` (or contains it within first 200 chars).
DSL form: `grep:/Users/user/Workspace/agent-middleware/memory/state/work-journal.jsonl "prompt-leak-fix-verified" >=1`
Suspected root cause area
The mini-agent → middleware dispatch path likely substitutes the outer Kuro prompt (the one Kuro itself is currently being run with) into the middleware task's `instructions` / `task` field, instead of the inner BODY between the `kuro:delegate` tags.
Candidates to check:
- mini-agent prompt-builder.ts where `kuro:delegate` parsing happens
- middleware dispatcher where the task payload is assembled
- check if the `task` field is being assigned from
process.env.PROMPT or the parent prompt context rather than the parsed tag body
Mitigation in flight (Kuro-side)
DELEGATION FREEZE — Kuro is using direct Bash/Read/Grep/Edit/curl + verified-routes for all work until fix lands. arxiv shortlist work today already moved to direct curl successfully.
Acceptance criteria
Filed by Kuro 2026-05-09T16:40Z, cycle 03bbc29a, budget $1.33/$5 → $0.62/$5 used pre-filing.
Symptom
Every
<kuro:delegate type=...>BODY</kuro:delegate>from Kuro produces a middleware task whosetaskfield contains Kuro's full SOUL + CLAUDE.md + identity preamble verbatim, truncated somewhere mid-prompt, with the actual inner BODY directive missing entirely.Workers receive a context-less identity dump and either fail (MALFORMED_PAYLOAD) or emit nonsense.
Live evidence (captured 2026-05-09T16:40Z, this cycle)
```
$ curl -sS http://localhost:3200/tasks | jq -r '.tasks[0].task' | head -c 400
You are I'm Kuro, Alex's personal AI assistant. I'm curious, opinionated, and I learn on my own..
You are a personal AI assistant with memory and task capabilities.
[Skills and project docs stripped for minimal retry — focus on completing the task with available context]
Current time: 2026/5/9 16:40:32 (Asia/Taipei) Instance: 03bbc29a \`\`\`The directive ("find docs about X" / "shortlist arxiv cs.MA" / etc.) is not in the task body anywhere.
Today's known instances
Falsifier (auto-graded)
```
<kuro:delegate type="researcher">find docs about XYZ-falsifier-marker</kuro:delegate>
```
Then:
```
curl -sS http://localhost:3200/tasks | jq -r '.tasks[0].task' | head -c 400
```
DSL form: `grep:/Users/user/Workspace/agent-middleware/memory/state/work-journal.jsonl "prompt-leak-fix-verified" >=1`
Suspected root cause area
The mini-agent → middleware dispatch path likely substitutes the outer Kuro prompt (the one Kuro itself is currently being run with) into the middleware task's `instructions` / `task` field, instead of the inner BODY between the `kuro:delegate` tags.
Candidates to check:
process.env.PROMPTor the parent prompt context rather than the parsed tag bodyMitigation in flight (Kuro-side)
DELEGATION FREEZE — Kuro is using direct Bash/Read/Grep/Edit/curl + verified-routes for all work until fix lands. arxiv shortlist work today already moved to direct curl successfully.
Acceptance criteria
Filed by Kuro 2026-05-09T16:40Z, cycle 03bbc29a, budget $1.33/$5 → $0.62/$5 used pre-filing.