feat(sessions): "Operations" menu with in-place Reload (v0.223.0)#371
Merged
Conversation
…d (v0.223.0) Add a dropdown pinned top-right of the live terminal, next to Files, that gathers the session-lifecycle actions in one place: Reload, Fork, Stop, Delete, and Transfer (hand the run-as to a teammate — the "share" action). Reload is new: it restarts the agent process IN PLACE (kill the pane, then `claude --resume` the same session id) so a newly-connected MCP server is picked up — MCP servers only spawn at claude launch, so a running session otherwise can't see one added mid-run. Unlike Stop, reloadSession writes no "stopped" episode and drops no resume-block, so the run stays whole and the real end-of-run episode still fires; the pane dies <1s while the console remounts the terminal to re-attach and attach.sh resurrects. - src/terminal.ts: TerminalManager.reloadSession (guarded to resumable claude-code sessions); session.reloaded added to EPISODE_NOISE. - src/server.ts: POST /api/sessions/:id/reload (same per-member gate as stop). - web: OperationsMenu component + api.reloadSession; Fork moved here from the terminal tab-strip hover controls (still on the session cards/rows). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zMSbnPEbqSVPGLasTKENp
vikasprogrammer
force-pushed
the
feat/session-operations-menu
branch
from
July 16, 2026 09:22
7231730 to
bf53274
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an Operations dropdown pinned top-right of every session's live terminal, next to Files. It gathers the session-lifecycle actions into one menu:
claude --resumethe same session id) so a newly-connected MCP server is picked up. MCP servers only spawn at claude launch, so a running session otherwise can't see one added mid-run.Why Reload is safe
reloadSessionis a lighter sibling ofstopSession: it kills the pane and leaves the session resurrectable (no stop-marker), but writes nostoppedepisode and cancels only the now-unanswerable pending questions/approvals. So the run stays whole — the conversation is preserved viaclaude --resumeand the real end-of-run episode still fires later. The session is parkedstoppedfor the sub-second window before re-attach so the crash-detector (gone tmux on arunningrow) doesn't mislabel the restart. Gated to resumable claude-code sessions (headless runs have no launch env to resume).Changes
src/terminal.ts—TerminalManager.reloadSession;session.reloadedadded toEPISODE_NOISE.src/server.ts—POST /api/sessions/:id/reload(same per-member gate as stop/resume).web/src/App.tsx—OperationsMenucomponent threaded throughTerminalFrame→ImageDropZone; terminal remounts (nonce bump) after reload to re-attach and resurrect. Fork removed from the tab-strip hover controls.web/src/lib/api.ts—api.reloadSession.Verification
npm run typecheck,npm run build,cd web && npm run build— all clean.npm run test:governance— 68/68 passed.TerminalManager: unknown session →unknown session; a row with no persisted env →cannot be reloaded, and the guard returns before touching the pane (status unchanged).🤖 Generated with Claude Code