Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(agents): drop dead ClaudeStatusEvent; agent-label notifications/tooltips; minor cleanups

enes6fc032859b15
diff --git a/src/main/agents/hooks/claude.ts b/src/main/agents/hooks/claude.ts
index adf88b48b..87d8fe35d 100644
--- a/src/main/agents/hooks/claude.ts
+++ b/src/main/agents/hooks/claude.ts
@@ -31,7 +31,6 @@ export function installClaudeHooks(): void {
export function removeClaudeHooks(): void {
removeHooksFrom({
- scriptFileName: SCRIPT_FILE_NAME,
configPath: configPath(),
events: CLAUDE_EVENTS
})
diff --git a/src/main/agents/hooks/gemini.ts b/src/main/agents/hooks/gemini.ts
index dead691e3..3013aba47 100644
--- a/src/main/agents/hooks/gemini.ts
+++ b/src/main/agents/hooks/gemini.ts
@@ -23,7 +23,6 @@ export function installGeminiHooks(): void {
export function removeGeminiHooks(): void {
removeHooksFrom({
- scriptFileName: SCRIPT_FILE_NAME,
configPath: configPath(),
events: GEMINI_EVENTS
})
diff --git a/src/main/agents/hooks/install-helper.ts b/src/main/agents/hooks/install-helper.ts
index 20fc11bd3..a3d031577 100644
--- a/src/main/agents/hooks/install-helper.ts
+++ b/src/main/agents/hooks/install-helper.ts
@@ -74,7 +74,6 @@ export function installHooksInto(opts: InstallHooksOptions): void {
}
export interface RemoveHooksOptions {
- scriptFileName?: string
configPath: string
events: readonly string[]
}
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 8fa6f8326..2b264d65c 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -1246,7 +1246,7 @@ export function Canvas() {
if (now - (notifyCooldownRef.current[e.nodeId] ?? 0) < 5000) return // dedup/cooldown
notifyCooldownRef.current[e.nodeId] = now
void window.nodeTerminal.notify({
- title: `${contextFor(e.nodeId)} — Claude ${statusText}`,
+ title: `${contextFor(e.nodeId)} — ${agentConfig(e.agentId)?.label ?? 'Agent'} ${statusText}`,
body: clip(e.lastMessage) || fallbackBody,
nodeId: e.nodeId
})
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 701ed1344..caccbe24f 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -19,7 +19,7 @@ import { useSettings } from '../state/settings'
import { useAgentStatus } from '../state/agentStatus'
import { useAgentNodes } from '../state/agentNodes'
import { COLLAPSED_HEIGHT, NODE_COLORS, type CanvasNode } from '../state/workspace'
-import { hasHooks, canRecur, canBridge, hasUsage, type AgentId } from '@shared/agents/config'
+import { hasHooks, canRecur, canBridge, hasUsage, agentConfig, type AgentId } from '@shared/agents/config'
/** Backslash-escape shell-special characters, like a native terminal does on file drop. */
function escapeDroppedPath(p: string): string {
@@ -63,6 +63,7 @@ export function TerminalNode({ id, data, selected }: NodeProps<CanvasNode>) {
const showLoop = !!agentId && canRecur(agentId) // /loop · /schedule · /cron chrome
const showBridge = !!agentId && canBridge(agentId) // bridge link handles
const showUsage = !!agentId && hasUsage(agentId) // per-node context-window meter
+ const agentLabel = (agentId ? agentConfig(agentId) : undefined)?.label ?? 'Agent'
const status = useAgentStatus((s) => s.byId[id])
const updateNodeInternals = useUpdateNodeInternals()
@@ -401,7 +402,7 @@ export function TerminalNode({ id, data, selected }: NodeProps<CanvasNode>) {
)}
{showUsage && <ContextMeter sessionId={status?.sessionId ?? null} />}
{status?.state === 'working' && (
- <span className="term-node__status term-node__status--busy" title="Claude is working">
+ <span className="term-node__status term-node__status--busy" title={`${agentLabel} is working`}>
<span className="term-node__status-dot" />
RUNNING
</span>
@@ -419,7 +420,7 @@ export function TerminalNode({ id, data, selected }: NodeProps<CanvasNode>) {
{(status?.state === 'waiting' || status?.state === 'blocked') && (
<span
className="term-node__status term-node__status--attention"
- title="Claude needs your input"
+ title={`${agentLabel} needs your input`}
>
<span className="term-node__status-dot" />
NEEDS YOU
diff --git a/src/renderer/state/workspace.ts b/src/renderer/state/workspace.ts
index 7e4e5b85e..46b344250 100644
--- a/src/renderer/state/workspace.ts
+++ b/src/renderer/state/workspace.ts
@@ -108,6 +108,9 @@ export function claudeLaunchCommand(): string {
return bridgeConfigPath ? `claude --mcp-config "${bridgeConfigPath}"` : 'claude'
}
+/** Fallback color for custom / unknown agents that have no config-provided color. */
+const FALLBACK_AGENT_COLOR = '#888888'
+
/**
* Resolves an agent's label/color/launch command. Builtins come from the static config;
* custom agents are looked up by id in the settings store. Falls back to the id itself for
@@ -117,8 +120,8 @@ function resolveAgent(agentId: AgentId): { label: string; color: string; launchC
const builtin = agentConfig(agentId)
if (builtin) return { label: builtin.label, color: builtin.color, launchCmd: builtin.launchCmd }
const custom = useSettings.getState().settings.customAgents.find((c) => c.id === agentId)
- if (custom) return { label: custom.label, color: '#888888', launchCmd: custom.launchCmd }
- return { label: agentId, color: '#888888', launchCmd: agentId }
+ if (custom) return { label: custom.label, color: FALLBACK_AGENT_COLOR, launchCmd: custom.launchCmd }
+ return { label: agentId, color: FALLBACK_AGENT_COLOR, launchCmd: agentId }
}
/**
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 6b910ce4f..7b6341af5 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -18,7 +18,7 @@ export interface PtyCreateOptions {
* injected at spawn. Defaults to 'claude' for backward compat; the renderer passes a
* real value in a later phase.
*/
- agentId?: string
+ agentId?: AgentId
}
// 'subagent' and 'loop' are render-only (ephemeral hook-driven viz) and never persisted.
@@ -359,35 +359,6 @@ export interface NotifyPayload {
force?: boolean
}
-/** A Claude Code lifecycle hook event, forwarded from the main process. */
-export interface ClaudeStatusEvent {
- nodeId: string
- /** SessionStart | UserPromptSubmit | Stop | Notification | SessionEnd | PreToolUse | PostToolUse */
- event: string
- sessionId?: string
- /** For Notification events: e.g. 'permission_prompt' | 'idle_prompt'. */
- notificationType?: string
- /** Claude's last assistant message (on Stop) — used as the notification body. */
- lastMessage?: string
- /** The user's prompt (UserPromptSubmit) — used to detect `/loop`. */
- prompt?: string
- /** Subagent tool events (PreToolUse/PostToolUse, tool_name Agent/Task). */
- toolName?: string
- toolUseId?: string
- subagentType?: string
- taskLabel?: string
- /** Recurring-task tools: skill name (Skill) and cron expression (CronCreate). */
- skill?: string
- schedule?: string
- /** Subagent result metadata (PostToolUse tool_response). */
- status?: string
- durationMs?: number
- tokens?: number
- toolUses?: number
- /** The subagent's result text (what it produced). */
- result?: string
-}
-
/** A chunk of a subagent's live transcript, streamed while it works. */
export interface SubagentActivity {
toolUseId: string