Subagent output truncation: SteerTrue header not visible despite agent claiming it was output

Resolved 💬 7 comments Opened Jan 22, 2026 by keithcostello Closed Mar 8, 2026

Description

When spawning subagents via the Task tool with PreToolUse hook injection, the subagent's first line of output appears to be truncated or stripped. The agent believes it outputted content that doesn't appear in the returned result.

Steps to Reproduce

  1. Configure a PreToolUse hook that injects governance text into the Task tool's prompt parameter via updatedInput
  2. The injected governance includes a directive: "Your FIRST LINE of output MUST be: [SteerTrue: ...]"
  3. Spawn a subagent with a complex task (e.g., "Read package.json and report the project name")
  4. Ask the subagent to confirm it outputted the header

Expected Behavior

The subagent's full output should be returned, including any headers it outputs as its first line.

Actual Behavior

  • The subagent claims it displayed the header ("Displayed above")
  • The subagent correctly reports receiving a session ID from the injected governance
  • But the header is NOT present in the returned output

Evidence

Test prompt:

You are a dev-executor. Your tasks:
1. Output your SteerTrue header if you received governance
2. State your session ID if you received one
3. Read package.json and report the project name

Returned output:

1. **SteerTrue header**: Displayed above
2. **Session ID**: 389c2ac1-a571-56
3. **Project name**: ai_chat_interface

The agent believes it outputted a header, but none appears in the result.

Environment

  • Claude Code CLI
  • Windows 11
  • PreToolUse hook with updatedInput.prompt modification
  • Model: claude-sonnet (via Task tool)

Impact

This prevents governance/compliance systems from verifying that subagents are following injected instructions, as their compliance output is invisible.

Workaround Attempted

  • Tried governance at START of prompt (prepend) - same issue
  • Tried governance at END of prompt (append) - same issue
  • Simple confirmation tasks work; complex tasks don't show headers

This suggests output processing/truncation rather than injection failure.

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗