v0.3.6 — Fix Telegram relay and message injection
Fixes
Telegram integration not responding ("Session respawned" with no reply)
Root cause analysis identified three issues:
-
Missing telegram-reply.sh on existing installations — The relay script that Claude uses to send responses back to Telegram was only installed by
instar add telegramduring initial setup. Post-update refreshes didn't install it, so after updates or on reinstalls, Claude had no way to relay responses back. -
Multi-line message injection splitting at newlines — Bootstrap messages sent via
tmux send-keys -lcontained newlines that tmux interpreted as Enter keypresses. This fragmented the message into multiple Claude prompts, causing confusion or silent failures. -
CLAUDE.md missing Telegram relay section — Post-update migration didn't add the Telegram relay instructions, so Claude didn't know how to format relay commands.
Changes
- SessionManager: Multi-line text injection now uses
tmux load-buffer/paste-bufferinstead ofsend-keys -l, preventing newline fragmentation - SessionManager:
waitForClaudeReadytimeout increased from 15s to 30s with diagnostic logging (logs what's visible on timeout) - SessionManager: Fallback injection when prompt detection times out (session may still work even if
❯wasn't detected) - server.ts: Bootstrap messages for auto-spawn and respawn are now single-line to avoid injection issues
- init.ts:
refreshHooksAndSettingsnow installs telegram-reply.sh when Telegram is configured - init.ts:
refreshClaudeMdnow adds the Telegram Relay section when Telegram is configured
Compatibility
- Compatible with v0.3.5 PostUpdateMigrator (parallel paths for script/CLAUDE.md installation)
- All 918 tests pass