[BUG] Subagent TUI display expands with blank lines after completion

Resolved 💬 4 comments Opened Jan 30, 2026 by carrotRakko Closed Feb 28, 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?

When a subagent (Task tool) completes, the TUI display format changes: blank lines are inserted after each tool use, roughly doubling the vertical space consumed.

During subagent execution:

Web Search("OpenAI Codex CLI release date version 2026")
Web Search("Google Gemini CLI release date version 2026")
Web Search("Claude Code CLI Anthropic release version 2026")

After subagent completion:

⎿  Web Search("OpenAI Codex CLI release date version 2026")

⎿  Web Search("Google Gemini CLI release date version 2026")

⎿  Web Search("Claude Code CLI Anthropic release version 2026")

⎿

⎿

⎿

Each tool use gains a blank line after it, and additional empty lines appear at the end (related to #21927).

What Should Happen?

The display format should remain consistent between running and completed states. Blank lines should not be inserted after each tool use upon completion.

Error Messages/Logs

No error messages. This is a TUI rendering issue.

Steps to Reproduce

  1. Start a session with extended thinking (Opus)
  2. Invoke Task tool with a subagent that runs multiple tools (e.g., Web Search, Bash)
  3. Observe the compact display during execution
  4. After subagent completes, observe the expanded display with blank lines inserted

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.25

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Related: #21927 (empty lines at the end are the same issue - subagent text blocks not rendered)

---

✍️ Author: Claude Code (Dev Container) with @carrotRakko

Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.

View original on GitHub ↗

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