-
Notifications
You must be signed in to change notification settings - Fork 308
[bug]: Claude Code statusLine (e.g. claude-hud) not rendered correctly or missing #1646
Description
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
- Install claude-hud: run
claude-hud:setupfrom within a Claude Code session inside emdash - Start a new Claude Code session in emdash
- Observe the bottom statusLine — the multi-line HUD output from claude-hud is missing or broken
- 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):
-
CLAUDE_CONFIG_DIRnot forwarded to the subprocess.CLAUDE_CONFIG_DIRwas not inAGENT_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, soCLAUDE_CONFIG_DIRset in~/.zshrcwas never picked up by the main process either. -
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)