Skip to content

[bug]: Claude Code statusLine (e.g. claude-hud) not rendered correctly or missing #1646

@ubuntudroid

Description

@ubuntudroid

Bug Description

Claude Code's statusLine feature (configured in settings.json as a command whose stdout is rendered at the bottom of the TUI) does not render reliably when Claude Code runs inside emdash. Symptoms observed with the claude-hud plugin:

  • The statusLine additions are missing entirely, or
  • They flicker briefly while typing, then disappear again, or
  • They only appear after moving focus away from the Claude Code terminal pane

Steps to Reproduce

  1. Install claude-hud: run claude-hud:setup from within a Claude Code session inside emdash
  2. Start a new Claude Code session in emdash
  3. Observe the bottom statusLine — the multi-line HUD output from claude-hud is missing or broken
  4. Click away to another panel or app, then look back at the terminal — the statusLine may now appear

Actual vs Expected Behavior

Actual: The statusLine is missing or renders at the wrong position, causing it to be invisible or to flicker. The behaviour is inconsistent: sometimes the correct content appears briefly, then gets overwritten.

Expected: The statusLine renders correctly at the bottom of the Claude Code TUI at all times, just as it does when running claude directly in a terminal emulator.

Root causes identified (both now fixed in PR):

  1. CLAUDE_CONFIG_DIR not forwarded to the subprocess. CLAUDE_CONFIG_DIR was not in AGENT_ENV_VARS, so a custom config dir (containing plugins like claude-hud) was silently dropped when emdash spawned Claude Code via direct PTY. Additionally, Electron GUI apps on macOS don't inherit shell profile env vars, so CLAUDE_CONFIG_DIR set in ~/.zshrc was never picked up by the main process either.

  2. Startup SIGWINCH desynchronises React Ink's statusLine line-counter. The PTY was spawned with a hardcoded fallback size of 120×32. fitAddon.fit() ran asynchronously one animation frame later with the actual container dimensions (e.g. 180×42), sending a SIGWINCH to Claude Code immediately after startup. Claude Code's React Ink TUI tracks how many statusLine rows it rendered in a counter ($); the SIGWINCH reset the layout mid-render, desynchronising this counter so the clear-and-redraw step (\x1B[${$}A\x1B[J) operated on the wrong number of lines, pushing the statusLine outside the visible viewport.

emdash Version

0.4.45

Operating System

macOS 25.4.0 (Darwin)

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions