Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/session-lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ export class SessionLifecycle {
session.claudeProcess = cp
this.deps.globalBroadcast?.({ type: 'sessions_updated' })

// Only show "Session started" for the initial start, not for restarts
// Only show "Session started" for the very first start, not for restarts
// triggered by model/permission changes — those already show a model message.
const isRestart = !!session._lastReportedModel
const isRestart = !!session._processStartedOnce
session._processStartedOnce = true
const startMsg: WsServerMessage = { type: 'claude_started', sessionId }
this.deps.addToHistory(session, startMsg)
if (!isRestart) {
Expand Down
2 changes: 2 additions & 0 deletions server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export interface Session {
_namingAttempts: number
/** The model reported by the last system init event, used to suppress duplicate init messages. */
_lastReportedModel?: string
/** Whether a process has been started at least once (to suppress "Session started" on restarts). */
_processStartedOnce?: boolean
/** Last user input sent, stored for API error retry. */
_lastUserInput?: string
/** First user input, preserved for session naming (not cleared by API retry). */
Expand Down
Loading