[BUG] Debug mode indicator persists in v2.0.67 despite workarounds

Resolved 💬 2 comments Opened Dec 12, 2025 by fidpa Closed Dec 17, 2025

Bug Description

Yellow "Debug mode" indicator appears persistently in Claude Code UI (bottom right corner) even when debug mode is not intended and cannot be disabled via documented workarounds.

Steps to Reproduce

  1. Install Claude Code v2.0.67 (Native Binary on Ubuntu 24.04 LTS)
  2. Configure shell with alias claude="DEBUG=False claude" in ~/.bashrc
  3. Start Claude Code in a new shell session
  4. Observe yellow "Debug mode" indicator in bottom right corner

Expected Behavior

  • Debug mode should ONLY activate when explicitly using --debug flag
  • Claude Code should NOT read DEBUG environment variables from project .env files or shell environment
  • The DEBUG variable is commonly used by web frameworks (Django, Flask, Express) for application-level debugging

Actual Behavior

  • Yellow "Debug mode" indicator appears persistently
  • Indicator persists across shell restarts and new sessions
  • Cannot be disabled via environment variable overrides

Environment

  • Claude Code Version: 2.0.67 (latest as of 2025-12-12)
  • Platform: Ubuntu 24.04 LTS (x86_64)
  • Installation Method: Native Binary (curl installer)
  • Shell: bash 5.2.21

Attempted Workarounds (ALL FAILED)

  1. ✅ Removed DISABLE_AUTOUPDATER=1 from .bashrc
  2. ✅ Added alias claude="DEBUG=False claude" to .bashrc
  3. ✅ Reloaded shell: source ~/.bashrc
  4. ✅ Updated to latest: claude update (2.0.64 → 2.0.67)
  5. ✅ Started completely new shell session
  6. ✅ Verified no DEBUG= in environment: env | grep DEBUG returns nothing
  7. ✅ Checked for .env files in project: None with DEBUG=True
  8. Debug mode indicator STILL appears

Investigation Results

Configuration checked:

  • ~/.bashrc: Contains alias claude="DEBUG=False claude"
  • ~/.claude/settings.json: {"alwaysThinkingEnabled": false}
  • ~/.claude/settings.local.json: Only permission rules, no debug settings
  • Repository .claude/settings.json: No debug-related settings

Session test:

# New shell
$ env | grep -i debug
# (no output - DEBUG not set)

$ claude --version
2.0.67 (Claude Code)

# Claude Code starts - "Debug mode" indicator appears in UI (yellow, bottom right)

Root Cause Theory

This appears to be related to Issue #11015 (locked), but persists in v2.0.67:

  • Claude Code may be reading DEBUG from internal state in ~/.claude/
  • The fix for #346 (regression) may not be fully applied in v2.0.67
  • Debug mode might be triggered by hooks or plugins

Impact

  • Visual Noise: Persistent yellow indicator creates confusion
  • Performance Concern: If debug logging is active in background, may impact performance
  • User Experience: No clear way to disable once triggered

Suggested Fix

  1. Completely ignore DEBUG environment variables (not Claude Code specific)
  2. Only activate debug mode via explicit --debug CLI flag
  3. Provide command to reset debug state: claude --reset-debug or similar
  4. Document how to disable debug mode in troubleshooting docs

Additional Context

  • Related to Issue #11015 (locked, cannot comment)
  • This is a fresh report for v2.0.67 confirming the issue persists
  • Full installation details: Native Binary, 4 versions installed (791 MB), auto-update enabled

Installation Structure:

  • Binary: ~/.local/bin/claude~/.local/share/claude/versions/2.0.67
  • Config: ~/.claude/ (13 subdirectories, ~26 MB)
  • Hooks: .claude/hooks/auto-approve-safe-commands.py (PermissionRequest hook)

View original on GitHub ↗

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