File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,10 @@ export class SessionLifecycle {
174174 session . claudeProcess = cp
175175 this . deps . globalBroadcast ?.( { type : 'sessions_updated' } )
176176
177- // Only show "Session started" for the initial start, not for restarts
177+ // Only show "Session started" for the very first start, not for restarts
178178 // triggered by model/permission changes — those already show a model message.
179- const isRestart = ! ! session . _lastReportedModel
179+ const isRestart = ! ! session . _processStartedOnce
180+ session . _processStartedOnce = true
180181 const startMsg : WsServerMessage = { type : 'claude_started' , sessionId }
181182 this . deps . addToHistory ( session , startMsg )
182183 if ( ! isRestart ) {
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ export interface Session {
8989 _namingAttempts : number
9090 /** The model reported by the last system init event, used to suppress duplicate init messages. */
9191 _lastReportedModel ?: string
92+ /** Whether a process has been started at least once (to suppress "Session started" on restarts). */
93+ _processStartedOnce ?: boolean
9294 /** Last user input sent, stored for API error retry. */
9395 _lastUserInput ?: string
9496 /** First user input, preserved for session naming (not cleared by API retry). */
You can’t perform that action at this time.
0 commit comments