main
John Lauer Publish 0.1.0 d8a45ab

name: hydrogen-ai-threads description: >- The AI Threads panel in Hydrogen: the live tree of open AI conversations (Claude, Codex, Kimi), reorder, rename, tag, TUI threads, and the beta on-startup setting. Use when asked about ai threads, my ai conversations, which ai is running, rename a thread, or a tui thread.

hydrogen-ai-threads: the AI Threads panel

AI Threads is a panel that shows every AI conversation open in the editor as one live tree, grouped the way the editor groups its tabs. Each row shows the conversation's AI (Claude, Codex, Kimi), its name, whether it is the foreground tab, and a busy indicator while that AI is generating. Click a row to bring its conversation forward.

It is BETA and off by default. The setting is Settings > Hydrogen > Behavior > Ai Threads On Startup. While it is off, nothing related to AI Threads runs: no background scans, no editor probing, nothing. You can still open the panel once from Add Panel (the + in any pane's tab bar) without touching the setting; doing so wakes the machinery for that session only.

What you can do in the panel

  • Reorder: drag a row; the row ghosts while the move lands, then settles. The order IS the editor's real tab order, so reordering here reorders the tabs. Pressing Escape mid-drag abandons the drag and restores everything.
  • Rename: right-click (or the row's menu) > Rename. The name is written into the conversation itself, so it survives restarts and shows on the editor tab. Renaming also works on TUI threads.
  • Tags: threads can carry tags (the dock uses dock:<app> to mark threads it opened). Tags attach as soon as a brand-new thread earns its identity.
  • New thread buttons: the toolbar has a button per AI. The small caret beside each opens that AI in a terminal instead: a named editor tab ("Claude TUI", "Codex TUI", "Kimi TUI") running the AI's full CLI. TUI threads appear in the tree like any other thread; drive the conversation in the terminal itself.
  • History / resume: past conversations that are not open right now can be reopened into a real editor tab.

Relationship to the API

The panel is a plain HTTP client of Hydrogen's control API and has no privileged access: everything above is POST /ai-threads/* under the hood, and any app, dock card, or AI can call the same routes. See hydrogen-ai-threads-api for the full surface (open, list, deliver a prompt with verification, resume, rename, close, tags) and how to find the control port from inside or outside the workspace.

Troubleshooting

  • Panel missing after restart: the on-startup setting is off (its default); turn it on, or open the panel from Add Panel for this session.
  • API returns "AI Threads is not active": same cause; while parked, read-only census calls refuse by design. A driving call (/ai-threads/new, a delivery) wakes the machinery for the session.
  • A terminal row shows a shell name (bash/zsh): that tab is a plain terminal, not an AI TUI; the tree deliberately excludes it from thread rows.