[BUG] SyntaxError with Sandbox Debug in v2.0.46

Resolved 💬 3 comments Opened Nov 19, 2025 by holyguard Closed Nov 23, 2025

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?

Bug Report: SyntaxError with Sandbox Debug Output in JSON

Version: 2.0.46 (Claude Code)
Platform: Linux (Ubuntu 22.04 / Kernel 6.8.0-87-generic)
Installation: Native VSCode Extension

Description

Claude Code extension fails to start properly with a JSON parsing error. The error message indicates that sandbox debug output is being mixed with JSON responses:

SyntaxError: Unexpected token 'S', "[SandboxDeb"... is not valid JSON
Troubleshooting resources

Symptoms

  • Error appears in Claude Code console on VSCode startup
  • When sending a message, the extension terminal hangs indefinitely (thinking/loading state)
  • The extension becomes completely unusable

Steps Already Attempted

  1. ✅ Removed conflicting extension (saoudrizwan.claude-dev)
  2. ✅ Cleared all Claude Code cache (~/.claude/debug/*, ~/.claude/todos/*)
  3. ✅ Completely uninstalled and reinstalled the extension
  4. ✅ Removed extension data (~/.config/Code/User/globalStorage/anthropic.claude-code)
  5. ✅ Restarted VSCode multiple times

Environment Details

  • Node.js: v20.19.5
  • VSCode Extension: anthropic.claude-code v2.0.46
  • CLI Binary: 2.0.46 (native ELF executable)
  • Working Directory: Standard user directory

Debug Information

The error appears to originate from the sandbox component outputting debug messages (likely prefixed with [SandboxDebug]) to stdout, which then gets mixed with JSON responses that the extension is trying to parse.

Expected Behavior

Claude Code should initialize properly without JSON parsing errors and respond to user messages.

Actual Behavior

The extension fails with a JSON syntax error and becomes unresponsive when attempting to send messages.

Reproduction

  1. Install Claude Code v2.0.46 on Linux (Ubuntu)
  2. Open VSCode and activate Claude Code extension
  3. Observe the error in Claude Code console
  4. Attempt to send a message - extension hangs

Additional Notes

  • The issue persists across complete reinstallations
  • Previous version (2.0.34) binary is available but extension auto-manages CLI version
  • Debug logs show no specific errors beyond the JSON parsing issue

This appears to be a regression in version 2.0.46 where sandbox debug output is incorrectly being sent to stdout instead of stderr or a debug log.

What Should Happen?

COnsole should work normally

Error Messages/Logs

SyntaxError: Unexpected token 'S', "[SandboxDeb"... is not valid JSON
Troubleshooting resources

Steps to Reproduce

open console

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.46

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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