Jonas H ee429be917 Crop claude chrome rows; size ask-tool pane from option count
Render window is now content-anchored instead of the raw screen top:
ends BOTTOM_CROP(2) rows above the last non-blank row (hides the
"? for shortcuts"/mode hint rows) and starts no higher than row 2
(hides "✻ Worked for 1s"; the streaming spinner stays visible since it
sits next to the input box). The PTY gets PTY_PAD(4) extra rows so
Claude Code still has room to draw what we crop. Compact pane shrinks
12 → 8 rows.

AskUserQuestion pane height is now estimated from the tool input
(max over questions of: question text + 2 rows per option incl. the
implicit "Other" + submit/hint rows + tab header), replacing the flat
75% — which remains the fallback for ExitPlanMode/parse failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 09:04:19 +02:00

claude-thinking

A TUI that displays Claude Code's streams token-by-token — thinking, text, and tool calls — by sitting as a pass-through proxy between Claude Code and the Anthropic API.

No extra usage: it never issues requests of its own; it observes the SSE stream of requests Claude Code was already making, forwarding bytes verbatim and unbuffered.

claude ──ANTHROPIC_BASE_URL──▶ claude-thinking (127.0.0.1:8484) ──▶ api.anthropic.com
                                      │
                                      ▼
                               TUI: live token feed

Usage

cargo build --release
./target/release/claude-thinking

Then point Claude Code at the proxy, either per-shell:

export ANTHROPIC_BASE_URL=http://127.0.0.1:8484
claude

or globally in ~/.claude/settings.json:

{ "env": { "ANTHROPIC_BASE_URL": "http://127.0.0.1:8484" } }

Note: with the global setting, Claude Code can't reach the API while the proxy isn't running.

Keys

key action
q / Esc quit
Tab / Shift-Tab switch session
j/k, arrows, PgUp/PgDn scroll (disables follow)
f / G / End follow live tail
g / Home jump to top

Display

  • ✻ thinking — dim italic, streamed token-by-token
  • text — rendered as markdown (tui-markdown)
  • ⚙ tool calls — input JSON pretty-printed on completion, raw fragments while streaming
  • meta — message boundaries with model, context size, stop reason, token counts
  • errors — API/stream errors in red

Sessions are keyed by the Claude Code session ID found in request metadata; concurrent requests (subagents) tap independently.

--headless runs the proxy without the TUI. CT_PORT overrides the port (default 8484).

Description
No description provided
Readme 2.3 MiB
Languages
Rust 97.3%
Python 2.7%