You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop restored shell tabs from re-running their command (#292)
## Summary
- A shell tab created via `create_shell` persists the command it was
launched with. `XTerminal` treated that field as an instruction: any
mount without a live PTY spawned `zsh -ilc <command>`. After a restart
there's never a live PTY, so opening a previously-created shell tab
silently re-ran whatever the agent had launched (`npm run dev`, a build,
anything). Same thing mid-session once the command's shell had exited
and the tab remounted.
- The renderer now always spawns a plain interactive shell. Execution
stays where it belongs — the single eager spawn in `createShell`
(`src/main/index.ts`) at creation time.
- The persisted `command` stays as a record of origin: still reported by
`list_shells`, still the tab's default label. Comments on
`TerminalTab.command` / `PersistedTab.command` updated to say so, since
the field name reads like an instruction.
## Test plan
- [x] `npm run typecheck`
- [x] `npx electron-vite build`
- [ ] Agent calls `create_shell` with a command → command runs
immediately in the new tab (unchanged)
- [ ] Quit and reopen Ness → focusing that shell tab gives an idle
prompt instead of re-running the command
- [ ] Let a command-backed shell exit, switch away and back → idle
prompt, no re-run
- [ ] Plain user-opened shell tabs (`+` → Shell) behave as before
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments