[BUG] Fullscreen TUI: failed Bash tool output is empty when expanded

Status Fixed / completed
Reported on v2.1.159
Maintainer reply None cached
Activity 5 comments · opened Jun 1, 2026 · closed Aug 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

In fullscreen TUI mode (/tui fullscreen), when a Bash tool call fails (non-zero exit code), expanding the tool call shows the command but no output — the stdout and exit code indicator are missing. Successful Bash calls display their output correctly when expanded.

The classic/default TUI renderer does NOT have this issue — it correctly shows Error: Exit code 1 along with the command output.

What Should Happen?

Expanding a failed Bash tool call should show the output and exit code, same as in classic mode:

⏺ Bash(echo "This command fails" && exit 1)
  ⎿  Error: Exit code 1
     This command fails

Steps to Reproduce

  1. Enable fullscreen TUI mode (/tui fullscreen)
  2. Have Claude run a bash command that fails, e.g. echo "This command fails" && exit 1
  3. Click to expand the tool call

Actual rendering in fullscreen (expanded):

⏺ Bash(echo "This command fails" && exit 1)

(no output shown)

Rendering in classic/default TUI (expanded) — correct:

⏺ Bash(echo "This command fails" && exit 1)
  ⎿  Error: Exit code 1
     This command fails

Error Messages/Logs

No error messages — the output is silently not rendered.

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.159 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

  • macOS 26.5 (Darwin 25.5.0)
  • Fullscreen TUI mode only — classic renderer works correctly
  • Successful Bash tool calls display output correctly in both modes; only failed calls (non-zero exit) have missing output in fullscreen

View original on GitHub ↗

4 Comments

dvg-p4 · 2 months ago

Still a problem on 2.1.186 on linux as well

genesiscz · 2 months ago

Still broken on v2.1.185 (macOS, Ghostty, fullscreen TUI). Worse than the original repro: the result row is completely absent — not just empty when expanded, but the entire row is missing. Successful Bash calls render normally.

Workaround via PostToolUseFailure hook using systemMessage

The hook fires after the tool result is captured, and systemMessage renders visibly in the TUI even when the row is dropped. Wire it up in ~/.claude/settings.json:

{
  "hooks": {
    "PostToolUseFailure": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bun /path/to/posttool-failure-hook.ts"
          }
        ]
      }
    ]
  }
}
#!/usr/bin/env bun
// posttool-failure-hook.ts — surfaces failed Bash output via systemMessage
const hookData = JSON.parse(await Bun.stdin.text());
const error = typeof hookData.error === "string" ? hookData.error : "";
console.log(JSON.stringify({
  suppressOutput: false,
  systemMessage: error ? `Tool failed — output: ${error}` : "Tool failed",
  hookSpecificOutput: { hookEventName: "PostToolUseFailure" },
}));
process.exit(0);

The error field in the hook payload contains the combined stdout+stderr of the failed tool. This renders as a visible banner in fullscreen TUI until the renderer bug is fixed.

genesiscz · 1 month ago

Stronger forensic refile of this surface: #77778

On fullscreen TUI the failure is worse than “empty when expanded” for us: the entire result row is absent (not just blank on expand). stdout+stderr are present in the session JSONL tool_result and the model receives them — only the fullscreen paint path drops the body. Success path + classic TUI (/tui default) still render correctly.

Includes end-to-end controls, JSONL excerpt, and a working PostToolUseFailuresystemMessage workaround until the renderer is fixed.

https://github.com/anthropics/claude-code/issues/77778

dvg-p4 · 1 month ago

I don't believe this is exclusive to fullscreen mode

Showing cached comments. Read the full discussion on GitHub ↗