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.

Merge origin/main into fix/cold-restore-dead-session

enes6df9b2782b3f
diff --cc src/renderer/nodes/TerminalNode.tsx
index 565f67f91,88d129244..908d5a8ba
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@@ -822,17 -821,16 +823,27 @@@ interface CoState
* respawn clears it.
*/
staleCwd: boolean
+ /**
+ * This node COLD-STARTED and the conversation its persisted session id names is gone, so the
+ * agent was launched bare instead of resuming a dead id (see `cold-resume-session.ts`).
+ *
+ * A slim banner rather than an overlay, for the same reason `staleCwd` is one: the terminal
+ * underneath is alive and working — the agent started, it simply started fresh. Nothing to
+ * retry, so the only control is a dismiss. Announced at all because the alternative is what
+ * this fixes from the other side: a fresh conversation opened in silence, under a node whose
+ * title, badge and history all still describe the old one.
+ */
+ lostSession: boolean
+ /**
+ * A one-shot launch command was REFUSED at delivery because it is longer than a canonical-mode
+ * tty line (`deliverCommand`'s `line-too-long`, issue #706). Holds the command's byte length,
+ * for the banner; `null` = nothing refused.
+ *
+ * NOT an overlay like `spawnError`: the terminal is alive and the user can run the command
+ * themselves — covering it would take away the only surface that can still be used. Same slim
+ * top banner as `staleCwd`, and for the same reason.
+ */
+ launchTooLongBytes: number | null
}
const NO_CO: CoState = {
letterbox: false,
@@@ -841,7 -839,7 +852,8 @@@
offline: false,
spawnError: null,
staleCwd: false,
- lostSession: false
++ lostSession: false,
+ launchTooLongBytes: null
}
const coStates = new Map<string, CoState>()
const coSubs = new Map<string, (s: CoState) => void>()
@@@ -1050,7 -1048,7 +1062,8 @@@ function setCo(key: string, patch: Part
next.offline === prev.offline &&
next.spawnError === prev.spawnError &&
next.staleCwd === prev.staleCwd &&
- next.lostSession === prev.lostSession
++ next.lostSession === prev.lostSession &&
+ next.launchTooLongBytes === prev.launchTooLongBytes
)
return
coStates.set(key, next)
@@@ -1874,7 -1872,7 +1887,8 @@@ export function TerminalNode(
}))
}
const dismissStaleCwd = (): void => setCo(termKey, { staleCwd: false })
+ const dismissLostSession = (): void => setCo(termKey, { lostSession: false })
+ const dismissLaunchTooLong = (): void => setCo(termKey, { launchTooLongBytes: null })
// "Not connected" (CoState.offline): the host was unreachable, so this node has no session
// anywhere. Ask the coordinator to re-establish the project's master NOW — it flushes the