claude-code - 💡(How to fix) Fix [Feature Request] Add plugin extensibility for TUI input events and output rendering hooks [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54611Fetched 2026-04-30 06:40:54
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Root Cause

That's a meaningful gap, because a lot of small but high-value developer-experience wins live exactly at that layer. One concrete example:

RAW_BUFFERClick to expand / collapse

Description Claude Code's plugin surface today (skills, slash commands, hooks, MCP servers, channels, status line, output styles) is rich for augmenting Claude's behavior but offers no way to augment the TUI itself. Hooks fire on Claude's lifecycle events; nothing fires on user input against rendered output. The chat renderer is closed.

That's a meaningful gap, because a lot of small but high-value developer-experience wins live exactly at that layer. One concrete example:

▎ When Claude mentions a file in chat output (e.g., src/components/auth/session.ts), I'd like to cmd-click it and see an ▎ inline accordion with the file contents or a diff — Quick Look, but in the TUI. Today the path is rendered in blue but the ▎ click does nothing.

I can't build this as a plugin. Not because the idea is hard, but because there's no extension primitive for it.

The ask (extensibility, not the feature)

Three primitives, in increasing scope. Any one of them would unblock a class of plugins, not just this one:

  1. Output-pattern renderer hook. Plugins register a regex (or matcher) that runs against rendered output lines. Matches get wrapped in a registered widget type (link, expandable, button). Claude Code stays in charge of layout; plugins just describe the interactive zones.
  2. TUI input events. A new hook category — OnClick, OnKeyChord — with target metadata (matched widget ID, position, modifiers). Without this, primitive #1 can render zones but can't react.
  3. Inline-expand primitive. A built-in widget type for "click to expand this region into an inline panel" — so plugins don't each reimplement a TUI accordion. Powered by the underlying terminal capabilities Claude Code already uses for its own collapsible regions (tool-call cards, thinking blocks).

Why this unblocks more than just file previews

  • Cmd-click on a line/range citation → jump to that line in $EDITOR
  • Cmd-click on a PR / issue number → expand the body inline
  • Cmd-click on a test name → expand its last failure output
  • Hover/preview on a memory entry the assistant cited → show the source file
  • Inline diff preview when Claude proposes a multi-file edit

All of these are currently slash-command-shaped today (/peek, /show, /diff) — usable, but a step away from the ergonomic ideal. The cost of typing a command is small per use but it adds up, and it breaks flow when the path is right there in the output.

Lower-effort fallback

If full input events are out of scope short-term, even just (1) — pattern-based renderer hooks that emit a slash-command suggestion when matched would help. Plugins could decorate file paths with a "press Tab to peek" affordance, with no new event system needed.

What I'd build with it

A quick-look plugin that registers a path matcher and on click expands an inline collapsible with the file contents (or a diff against HEAD if it's a tracked file with uncommitted changes). Happy to prototype against an early API.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.123
  • Feedback ID: 45b18acb-e34a-440b-b447-80723d566029

extent analysis

TL;DR

Implementing output-pattern renderer hooks would allow plugins to register regex matchers against rendered output lines, enabling interactive zones and addressing the current limitation.

Guidance

  • Consider introducing a new hook category for output-pattern rendering, allowing plugins to register regex matchers and wrap matches in interactive widgets.
  • Evaluate the feasibility of adding TUI input events, such as OnClick and OnKeyChord, to enable plugins to react to user interactions.
  • Explore the possibility of creating an inline-expand primitive, a built-in widget type for expanding regions into inline panels, to simplify plugin development.
  • Assess the potential of a lower-effort fallback, where pattern-based renderer hooks emit slash-command suggestions when matched, to provide some level of interactivity without a full event system.

Example

No code snippet is provided due to the lack of specific technical details in the issue.

Notes

The proposed solution relies on the introduction of new APIs or hooks, which may require significant changes to the existing architecture. The feasibility and scope of these changes should be carefully evaluated.

Recommendation

Apply a workaround by implementing output-pattern renderer hooks, as this would provide a foundation for plugins to create interactive zones and address the current limitation, even if it's not a full solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature Request] Add plugin extensibility for TUI input events and output rendering hooks [1 comments, 2 participants]