Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

System prompt rule keyed on TaskOutput, a tool removed in Claude Code v2.1.278, so it never fires

Open bowlax opened this issue 2 months ago • 1 comments

Version

LifeOS 7.40.4 / LIFEOS_SYSTEM_PROMPT.md (verified against main, 2026-09-19)

What is broken

The shipped system prompt tells the model to stay silent on a duplicate task notification, but gates that behaviour on a condition that can no longer be true. The rule reads:

Never respond to duplicate task notifications. Output already consumed via TaskOutput → ZERO output on <task-notification>.

TaskOutput was removed from Claude Code in v2.1.278. Background task output now reaches the model as the agent's hand-back message, and is never "consumed via TaskOutput" by anything. The antecedent is therefore permanently false and the suppression never engages, so every duplicate <task-notification> draws a full response from the model. The rule is not violated; it is unreachable.

This is independent of LifeOS architecture. Any install carrying this line on Claude Code 2.1.278 or later has the behaviour, whatever Algorithm version it runs.

Where (file:line)

LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md:133

Repro on a clean tree

# 1. The rule, as shipped
gh api repos/danielmiessler/LifeOS/contents/LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md \
  --jq '.content' | base64 -d | sed -n '133p'
# -> - **Never respond to duplicate task notifications.** Output already consumed via TaskOutput → ZERO output on `<task-notification>`.

# 2. The tool it names, in the harness
claude --version
# -> 2.1.278 (Claude Code) or later

# Claude Code CHANGELOG, v2.1.278:
#   "Removed the deprecated TaskOutput tool; Claude reads a background task's
#    output file with Read instead, and the taskOutputMaxChars setting and
#    TASK_MAX_OUTPUT_LENGTH no longer have any effect"

# 3. Behavioural repro: in a session on 2.1.278+, spawn two or more background
#    agents and let them finish. Each agent's report arrives as a hand-back
#    message. A <task-notification> for the same agent follows, carrying no new
#    content. Observe that the model answers each one.

Negative control

Run against unpatched 7.40.4 on Claude Code 2.1.278, phrased without reference to any fix.

In one session that spawned nine background agents, six duplicate <task-notification> events each received a full model response, including the banner-and-closer output format, despite the corresponding agent report having already been delivered and acted on in the preceding turn. Zero notifications were suppressed.

The rule's guard cannot fire because no code path in the harness consumes output "via TaskOutput" any more: the tool is gone. There is no configuration under which this check has been green since v2.1.278, which is what makes it worth reporting rather than tuning.

Suggested fix

Rekey the condition on the mechanism that actually delivers the output. Untested beyond one install, where it stopped the behaviour immediately:

-- **Never respond to duplicate task notifications.** Output already consumed via TaskOutput → ZERO output on `<task-notification>`.
+- **Never respond to duplicate task notifications.** A background agent's report arrives as a hand-back message from that agent; the `<task-notification>` that follows carries no new content. Once you have seen and acted on the hand-back, produce ZERO output when its `<task-notification>` arrives. Match on the agent id, since the same task-id can notify more than once.

Matching on agent id rather than task id matters: the harness notes that a task-id may notify more than once when an agent stops with no live children.

Two adjacent lines in the same file are stale from the same Claude Code release and may be worth the same pass, though neither changes behaviour: settings.system.json still allow-lists TaskOutput as a tool name, and taskOutputMaxChars / TASK_MAX_OUTPUT_LENGTH no longer have any effect.

bowlax avatar Sep 19 '26 21:09 bowlax

Thanks @bowlax. The rule was keyed to a tool that no longer exists, so it could never fire. It now covers output already received, either as the agent's hand-back message or by reading the task's output file, which is the case you measured. That goes out in the next public release (8.3.0).

danielmiessler avatar Sep 28 '26 19:09 danielmiessler