[BUG] Silent exit after OAuth token check loop (272+ iterations) on macOS

Resolved 💬 3 comments Opened Feb 5, 2026 by cafe24-yyoh Closed Feb 8, 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?

Claude Code silently exits without any error message. Debug logs show an abnormal pattern: [API:auth] OAuth token check complete is logged 272+ times within 1 second before the process terminates.

The exit occurs randomly - during idle, while typing, or during tool execution. No specific trigger pattern identified.

What Should Happen?

Claude Code should continue running normally without excessive OAuth token checks or silent termination.

Environment

| Component | Value |
|-----------|-------|
| Claude Code Version | 2.1.25 |
| Node.js | v23.11.0 |
| OS | macOS 15.6.1 (Darwin 24.6.0) |
| Platform | darwin arm64 |

Error Messages/Logs

Debug log ends abruptly with no shutdown message:

2026-02-05T02:42:39.882Z [DEBUG] [API:auth] OAuth token check complete
2026-02-05T02:42:39.882Z [DEBUG] [API:auth] OAuth token check complete
2026-02-05T02:42:39.882Z [DEBUG] [API:auth] OAuth token check complete
... (272 total occurrences within ~1 second)
2026-02-05T02:42:40.806Z [DEBUG] [API:request] Creating client...
2026-02-05T02:42:41.502Z [DEBUG] Auto tool search enabled: 45570 tokens
2026-02-05T02:42:52.389Z [DEBUG] High write ratio: blit=90, write=49067 (99.8% writes)
2026-02-05T02:42:53.670Z [DEBUG] High write ratio: blit=90, write=55187 (99.8% writes)
2026-02-05T02:42:56.072Z [DEBUG] High write ratio: blit=90, write=36072 (99.8% writes)
[EOF - no shutdown, no error]

Steps to Reproduce

  1. Start claude in any project directory
  2. Use Claude Code normally (conversation, tool calls, etc.)
  3. Process exits randomly - could be during idle, typing, or tool execution
  4. Check debug log: ~/.claude/debug/*.txt shows OAuth loop pattern

Key Observations

  1. OAuth token check spam: 272 calls within ~1 second (same millisecond timestamps)
  2. High write ratio warnings: 99.8% writes to terminal before crash
  3. No graceful shutdown: Debug log ends without any exit/shutdown message
  4. Random timing: Not correlated with specific tools or user actions

Claude Model

Opus

Is this a regression?

Unknown - issue persists across sessions

Claude Code Version

2.1.25 (Claude Code)

Platform

macOS

View original on GitHub ↗

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