Skip to content

fix: show 'Session started' immediately on startup#386

Merged
alari76 merged 1 commit intomainfrom
fix/session-started-message
Apr 12, 2026
Merged

fix: show 'Session started' immediately on startup#386
alari76 merged 1 commit intomainfrom
fix/session-started-message

Conversation

@alari76
Copy link
Copy Markdown
Contributor

@alari76 alari76 commented Apr 12, 2026

Summary

  • Show a "Session started" system message on claude_started instead of suppressing it — fixes the empty chat on session startup
  • Reset _lastReportedModel when starting a new Claude process so the model info always appears on system_init
  • Updated tests to reflect the new behavior

Test plan

  • Create a new session — verify "Session started" message appears immediately
  • Send first message — verify model info and response both appear
  • Restart server with an active session — verify model info still shows after auto-restore

🤖 Generated with Claude Code

Previously claude_started was suppressed and the first visible message
only appeared on system_init, which fires after the first user input —
leaving the chat empty until then. Now claude_started renders a
"Session started" system message immediately.

Also resets _lastReportedModel on process start so the model info
message always appears on system_init, even across process restarts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alari76 alari76 force-pushed the fix/session-started-message branch from 016065e to 7ce40a2 Compare April 12, 2026 16:02
@alari76 alari76 merged commit d8b053f into main Apr 12, 2026
2 checks passed
@alari76 alari76 deleted the fix/session-started-message branch April 12, 2026 16:03
alari76 added a commit that referenced this pull request Apr 12, 2026
…tup (#386)

Use a dedicated _processStartedOnce flag to detect restarts instead of
_lastReportedModel, which may be undefined when the first process never
emitted system_init (e.g. OpenCode sessions starting without a model).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant