Focus view hides the answer written before a Stop hook continues the turn

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 12, 2026

What's Wrong?

With focus view on, the answer Claude writes before a Stop hook blocks the stop is collapsed, and only the short reply after the hook stays visible.

The model answers, a Stop hook returns decision: block, the model runs the requested tool call and ends with "OK". Focus view shows only "OK"; the footer says "1 message hidden (/focus to show)", and that hidden message is the answer.

The model cannot tell its answer was hidden, so it will not restate it.

What Should Happen?

The last assistant message before a Stop-hook continuation stays visible in focus view.

Steps to Reproduce

A project with one Stop hook that blocks the first stop and allows the second.

.claude/hooks/block-once.sh (executable):

#!/bin/bash
# Block the first stop, allow the second.
# stop_hook_active is true when Claude is already continuing because of a Stop hook.
input=$(cat)
if [ "$(echo "$input" | jq -r '.stop_hook_active')" = "true" ]; then
  exit 0
fi
echo '{"decision": "block", "reason": "Before finishing, run `echo check` with the Bash tool, then reply with only the word OK."}'

.claude/settings.json:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-once.sh" }
        ]
      }
    ]
  }
}
  1. cd /tmp/focus-hook-repro && claude
  2. /focus to turn focus view on.
  3. Ask: What is the capital of Australia? Answer in one sentence.
  4. Only "OK" is visible.
  5. /focus again to turn it off. The Canberra answer is above the hook line.

Text capture of the terminal, focus view on:

❯ /focus
  ⎿  Focus view enabled

❯ What is the capital of Australia? Answer in one sentence.

● Ran 5 stop hooks
  ⎿  Stop hook error: Before finishing, run `echo check` with the Bash tool, then reply with only the word OK.

  Ran 1 shell command

OK

✻ Crunched for 12s · done 11:49 AM · 1 message hidden (/focus to show)

Text capture of the terminal, same transcript after /focus turned it off:

❯ /focus
  ⎿  Focus view enabled

❯ What is the capital of Australia? Answer in one sentence.

The capital of Australia is Canberra.

● Ran 5 stop hooks
  ⎿  Stop hook error: Before finishing, run `echo check` with the Bash tool, then reply with only the word OK.

  Ran 1 shell command

OK

✻ Crunched for 12s · done 11:49 AM

❯ /focus
  ⎿  Focus view disabled

This run had 5 Stop hooks: my global ones plus the repro's. The repro's hook alone is enough. A headless run with only project settings (claude -p "What is the capital of Australia? Answer in one sentence." --output-format stream-json --verbose --setting-sources project) gives this order: assistant "The capital of Australia is Canberra." → user "Stop hook feedback: …" → assistant Bash echo check → tool result "check" → assistant "OK" → result.

Claude Model

claude-opus-5-5 (headless run)

Claude Code Version

2.1.296 (Claude Code)

Operating System

Ubuntu 24.04.5 LTS, Linux 7.0.0-34-generic

Terminal/Shell

Claude Code in a terminal, focus view toggled with the /focus command.

Additional Information

Related: #50894 (focus mode hides substantive assistant messages), closed as not planned.

The difference here: the model did put the answer in its final message, and the turn had ended. The tool call that pushed the answer out of view came from a Stop-hook continuation, not from the model's own work. Writing the answer last, which #50894 suggests the model should do, does not help in this case.

The "1 message hidden" footer exists now, but it does not say that the hidden message is the answer.

Possible fixes:

  • Keep the last assistant message before a Stop-hook continuation visible.
  • Or expand the pre-hook message when a Stop hook continues the turn.

Same mechanism in another app: pingdotgg/t3code#5297.

View original on GitHub ↗