v1.2.1 — Universal terminals and Ghostty support, eight new hooks, rich /status
The biggest CCGram release yet. Universal terminal support, Ghostty integration, eight new hook events, a completely rewritten /status, and a sweep of critical hook-format fixes that were silently breaking question answering.
v1.2.1 note: No code changes from v1.2.0. README was refreshed to cover the new features (universal terminal support, Ghostty backend, rich
/status, deep links, the eight new hooks, the newsrc/utils/modules) and the patch bump publishes that refreshed README to the npm package page.
Headline features
- Direct question answering — no more keystroke injection.
AskUserQuestionanswers now flow back to Claude Code through theupdatedInputhook output, so Telegram answers land in any terminal: tmux, Ghostty, bare zsh, screen, anything. The AppleScript /tmux send-keyspath for questions is gone. - Ghostty integration. Full Ghostty support via AppleScript — auto-detected when
TERM_PROGRAM=ghostty. Keystroke injection, tab focus, command routing all work the same as tmux. macOS only. - Rich
/statuscommand. Completely rewritten using Claude Code's transcript JSONL. Now shows model, Claude Code version, git branch, session ID + slug, context window usage with auto-detected 1M mode, rate limit + reset time, last activity timestamp, and the last assistant message snippet. Works for every terminal type. - Deep links. New
/link <prompt>command generatesclaude-cli://open?q=...URLs that open Claude Code anywhere with your prompt pre-filled.
Eight new hook events
| Hook | What it gives you |
|---|---|
PermissionDenied |
Telegram retry button when auto-mode blocks a tool |
PreCompact |
Block context compaction with one tap |
PostCompact |
Confirms compaction completed, with token savings |
Elicitation |
Forwards MCP server input requests to Telegram (schema-aware, per-field) |
StopFailure |
Instant alerts on API errors and rate limits |
TaskCreated |
Notify when Claude creates a task |
CwdChanged |
Track when Claude changes working directory |
InstructionsLoaded |
Debug aid for CLAUDE.md / rules loading |
New Telegram commands
/link <prompt>— generate a Claude Code deep link/effort [workspace] low|medium|high— set thinking effort/model [workspace] <model>— switch model (sonnet, opus, haiku)
Permission improvements
- Defer button on permission prompts pauses the session for async approval
- Session title support in permission and notification messages
Rate limit visibility
- Hook payloads'
rate_limitsfield extracted and stored per-session /statusdisplays current usage, percent, and reset time
Critical fixes
Four hook scripts had silently-malformed stdout shapes that Claude Code was ignoring without any error log. All audited against the official docs and corrected:
question-notify.ts— was outputting an invented format. Now correctly echoes the originalquestionsarray plus a separateanswersmap keyed by question text. Symptom was "I answered in Telegram, then the question also popped up in the terminal."pre-compact-notify.ts—decision: "block"was nested insidehookSpecificOutput. Now at top level. Block button finally blocks compaction.permission-denied-notify.ts— was missing requiredhookEventName. Retry button now actually retries.elicitation-notify.ts— had a completely invented shape. Now parses MCPrequested_schema.properties, prompts per field, emits proper{action: "accept", content: {...}}.
Other improvements
- Removed stale
!pending.tmuxSessioncheck from callback handlers (was dropping responses in bare-terminal sessions) enhanced-hook-notify.tsuseslast_assistant_messagedirectly from hook payloads (Claude Code v2.1.47+)- Hook
ifconditions (Claude Code v2.1.85+) supported insetup.ts - Test suite grew from 84 → 120 tests across 6 suites
Documentation
- README rewritten to cover all v1.2.0 features: universal terminal support, Ghostty backend, rich
/status, deep links, the eight new hooks - Architecture diagram lists
permission-denied-notify,pre-compact-notify,elicitation-notify, plus the newsrc/utils/modules (transcript-reader,deep-link,ghostty-session-manager) - FAQ "Do I need tmux?" rewritten to cover all three injection backends
- Test counts updated (84 → 120 tests across 6 suites)
Upgrade
npx @jsayubi/ccgram@latest initThe wizard merges the new hook entries into ~/.claude/settings.json and refreshes ~/.ccgram/dist/. Existing config (.env, session map, project history) is preserved.
Full changelog: v1.1.1...v1.2.1