[BUG] Context Loss Bug in v2.1.3/2.1.4

Resolved 💬 6 comments Opened Jan 11, 2026 by konian71 Closed Jan 18, 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?

After a few prompts, Claude Code loses ALL context data. All memory files, agents, and rules show 0 tokens in /context output, causing API requests to fail.

What Should Happen?

Context should remain loaded during entire session. Memory files, agents, and rules should show their actual token counts (typically hundreds to thousands of tokens each, not 0).

Error Messages/Logs

/context output showing complete context loss:

❯ /context                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  ⎿   Context Usage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
     ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   claude-opus-4-5-20251101 · 0k/200k tokens (0%)                                                                                                                                                                                                                                                                                                                                                                                                                              
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Skills: 53 tokens (0.0%)                                                                                                                                                                                                                                                                                                                                                                                                                                                  
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛶ Free space: 155k (77.5%)                                                                                                                                                                                                                                                                                                                                                                                                                                                  
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛝ Autocompact buffer: 45.0k tokens (22.5%)                                                                                                                                                                                                                                                                                                                                                                                                                                  
     
     Custom agents · /agents
     Project
     └ mariadb: 0 tokens
     └ mailer: 0 tokens
     └ javascript: 0 tokens
     └ model: 0 tokens
     └ browser: 0 tokens
     └ coder: 0 tokens
     └ docs: 0 tokens
     └ critical: 0 tokens
     └ views: 0 tokens
     └ style: 0 tokens
     └ analysis: 0 tokens
     
     Memory files · /memory
     └ /srv/CLAUDE.md: 0 tokens
     └ CLAUDE.md: 0 tokens
     └ .claude/rules/architecture.md: 0 tokens
     └ .claude/rules/basics.md: 0 tokens
     └ .claude/rules/css.md: 0 tokens
     └ .claude/rules/projektleiter.md: 0 tokens
     
     Skills · /skills
     Project
     └ todo: 29 tokens
     └ doit: 13 tokens
     └ status: 11 tokens

All memory files, agents, and rules show 0 tokens - complete context data loss.
API requests fail because no context is loaded.

Steps to Reproduce

  1. Use Claude Code 2.1.4 normally
  2. Wait until API requests start failing
  3. Run /context
  4. Observe: All memory files and agents show 0 tokens

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.58

Claude Code Version

2.1.4

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Workaround:
/clear temporarily fixes by reloading context, but only for few more prompts.

Permanent Fix:
Downgrading to version 2.0.58 resolves the issue completely. Related to Issue #17453 (lag problem in 2.1.3). Both issues resolve by downgrading to 2.0.58.

View original on GitHub ↗

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