testsAndMisc/linux_configuration/zsh
Krzysztof kuhy Rudnicki b57a130e9b claude-tty-fix.zsh: precmd mouse-heal, debug logging, on-demand MCP launchers
Diagnosed the "claude keeps crashing + mouse-command garble" as three stacked
bugs (remoteControlAtStartup end_session collision, SIGTTIN suspend on early
input, and an upstream REPL-exits-on-startup-input). This carries the shell-side
mitigations and the tooling that caught them:

- _claude_mouse_heal precmd hook: disables mouse tracking before every prompt,
  so garble left by a *suspended* claude clears on the next Enter (the on-exit
  reset in claude() can't fire while the function is blocked in a suspend).
- Always-on --debug-file logging in claude() (~/.claude/logs, keeps last 20;
  opt out with CLAUDE_DEBUG_LOG_OFF=1) -- this captured all three root causes.
- On-demand launchers claude-rag/-travel/-sports/-media/-extras load the niche
  MCP servers via --mcp-config, keeping them out of the always-on global fleet.
- claude-debug raw-binary probe (note: zsh printf has no %(...)T directive).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LZ15AWWYN8xGKdwXKn7foM
2026-07-18 15:55:28 +02:00
..
scratchpad refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
calc-live.zsh refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
calc-popup.sh refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
claude-tty-fix.zsh claude-tty-fix.zsh: precmd mouse-heal, debug logging, on-demand MCP launchers 2026-07-18 15:55:28 +02:00