[BUG] Session unexpectedly initialized without user action, causing conversation history loss

Resolved 💬 2 comments Opened Jun 20, 2026 by isysowmay Closed Jun 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

During an active session on Claude Code on the web (cloud environment), the system automatically displayed a message "セッションを初期化しました" (Session has been initialized) without any user action. This caused complete loss of conversation history, and Claude lost all context from earlier in the same session.

Timeline:

  1. User was working on a task (repository separation work)
  2. Session appeared to freeze/stop responding
  3. User typed "続けて。" (Continue) to resume
  4. System displayed "セッションを初期化しました" in the chat
  5. Claude had no memory of what happened earlier in the session
  6. Conversation history started from the middle, missing all initial messages

User actions before the issue:

  • No /clear or /reset commands were executed
  • No UI buttons were clicked
  • Simply tried to continue the conversation

Session context:

  • Session duration: Several months (used intermittently, not continuously)
  • Today's active session before issue: 1-2 hours
  • Platform: Claude Code on the web (cloud environment)

What Should Happen?

According to the documentation:

"The system will automatically compress prior messages in your conversation as it approaches context limits."

Expected behavior:

  • Session should compress (summarize) old messages when approaching limits
  • Conversation history should be preserved
  • Context should remain intact
  • User should not lose conversation history without explicit action

Actual behavior:

  • System displayed "初期化" (initialized), not "再開" (resumed)
  • History was completely lost, not compressed
  • No warning or user confirmation before initialization

The message said "初期化" (initialized), not "再開" (resumed):

  • "再開" (resumed) = normal when restarting paused session (history preserved)
  • "初期化" (initialized) = abnormal (history cleared)

Error Messages/Logs

No error messages. The system displayed:

セッションを初期化しました
(Session has been initialized)


This appeared in the chat as a system message, similar to "セッションを再開しました" (Session resumed) messages.

Steps to Reproduce

Hard to reproduce intentionally, but conditions were:

  1. Use Claude Code on the web (cloud environment)
  2. Create a session and use it intermittently over several months
  3. Let the session accumulate substantial conversation history
  4. Continue working in the session (today's active session: 1-2 hours)
  5. Session may hit some internal limit (memory, context, time, etc.)
  6. Try to continue the conversation → session gets initialized instead of compressed

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Latest version as of 2026-06-20 (Claude Code on the web)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Non-interactive/CI environment

Additional Information

Important context:

  1. Long-running session: Several months old, used intermittently (not continuously active)
  2. No user action triggered this: User did not execute any clear/reset command
  3. Loss of trust: Users rely on conversation history preservation. Unexpected loss is a critical issue.
  4. Japanese UI message: "セッションを初期化しました" suggests this may be locale-specific behavior

Impact:

  • Critical: Breaks user workflow mid-session without warning
  • Requires manual recovery (copy-pasting history to restore context)
  • Significant time waste and confusion
  • Damages trust in the system's reliability

Suggested investigation:

  • Check session management for long-running sessions (multi-month usage)
  • Check what triggers "初期化" (initialize) vs "再開" (resume) messages
  • Verify context compression is working correctly in cloud environments
  • Check if there's an undocumented limit for intermittent/long-running sessions

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗