[BUG] Fatal crash in file operations after executing SQLite database queries
Resolved 💬 3 comments Opened Jul 24, 2025 by MorsePotential Closed Jan 4, 2026
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.59 (Claude Code)
- Operating System: macOS (Darwin 24.5.0)
- Terminal: zsh
- Node.js version: 21.5.0
Bug Description
Claude Code crashes with a fatal V8 error (v8::ToLocalChecked Empty MaybeLocal) when working with SQLite database operations and file system operations in a SvelteKit
project. The crash occurs consistently when Claude attempts to read files after executing database queries.
Steps to Reproduce
- Open a project with SQLite database and SvelteKit frontend
- Execute SQLite queries to investigate duplicate records (e.g.,
SELECT keyword, country, device, COUNT(*) ... GROUP BY ...) - Claude attempts to continue working and read project files
- Fatal crash occurs with V8 error in
node::fs::ReadFileUtf8
Expected Behavior
Claude Code should be able to:
- Execute SQLite queries and continue working without crashing
- Read files normally after database operations
- Handle file system operations without V8 errors
Actual Behavior
Claude Code crashes with:
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal- Stack trace shows failure in
node::fs::ReadFileUtf8 - The crash happens in the file reading operation at
readFileSync (node:fs:453:20) - Claude's internal file handling at
file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js
Additional Context
### Related Information
- Project uses SQLite with SQLModel
- Frontend uses SvelteKit
- Database operations were working correctly before the crash
- The crash prevents completion of debugging tasks
### SQL Command Executed Before Crash
``sql``
SELECT keyword, country, device, COUNT(*) as count, GROUP_CONCAT(id) as ids
FROM keyword_analyses
WHERE is_latest = 1
GROUP BY keyword, country, device
HAVING COUNT(*) > 1;
### Full Error Output
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal
----- Native stack trace -----
1: 0x10030a528 node::OnFatalError(char const*, char const*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
2: 0x100484d5c v8::Utils::ReportApiFailure(char const*, char const*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
3: 0x100319604 node::fs::ReadFileUtf8(v8::FunctionCallbackInfo<v8::Value> const&) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
4: 0x100092a38 Builtins_CallApiCallbackGeneric [/opt/homebrew/Cellar/node/21.5.0/bin/node]
5: 0x10858bb7c
6: 0x108365134
7: 0x10885bb54
8: 0x100090b84 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node/21.5.0/bin/node]
9: 0x1001812d8 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/21.5.0/bin/node]
10: 0x1000b6654 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/21.5.0/bin/node]
11: 0x10008e794 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/21.5.0/bin/node]
12: 0x1005a4a60 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&)
[/opt/homebrew/Cellar/node/21.5.0/bin/node]
13: 0x1005a5224 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&)
[/opt/homebrew/Cellar/node/21.5.0/bin/node]
14: 0x1005c68d4 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
15: 0x1005c670c v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
16: 0x100092b90 Builtins_CallApiCallbackOptimizedNoProfiling [/opt/homebrew/Cellar/node/21.5.0/bin/node]
17: 0x1087b7fdc
18: 0x10008e8ac Builtins_JSEntryTrampoline [/opt/homebrew/Cellar/node/21.5.0/bin/node]
19: 0x10008e594 Builtins_JSEntry [/opt/homebrew/Cellar/node/21.5.0/bin/node]
20: 0x1005a4a88 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&)
[/opt/homebrew/Cellar/node/21.5.0/bin/node]
21: 0x1005a4480 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int,
v8::internal::Handle<v8::internal::Object>*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
22: 0x10049893c v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
23: 0x100228c68 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/21.5.0/bin/node]
24: 0x1002290e8 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*,
node::async_context) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
25: 0x10024085c node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
26: 0x1003eb124 node::StreamBase::CallJSOnreadMethod(long, v8::Local<v8::ArrayBuffer>, unsigned long, node::StreamBase::StreamBaseJSChecks)
[/opt/homebrew/Cellar/node/21.5.0/bin/node]
27: 0x1003eb4dc node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
28: 0x10045e0f0 node::crypto::TLSWrap::ClearOut() [/opt/homebrew/Cellar/node/21.5.0/bin/node]
29: 0x10045e598 node::crypto::TLSWrap::Cycle() [/opt/homebrew/Cellar/node/21.5.0/bin/node]
30: 0x10045cbb8 node::crypto::TLSWrap::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
31: 0x1003f19cc node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
32: 0x1003f1674 node::LibuvStreamWrap::ReadStart()::$_1::__invoke(uv_stream_s*, long, uv_buf_t const*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
33: 0x1034bb618 uv__stream_io [/opt/homebrew/Cellar/libuv/1.47.0/lib/libuv.1.dylib]
34: 0x1034c21c0 uv__io_poll [/opt/homebrew/Cellar/libuv/1.47.0/lib/libuv.1.dylib]
35: 0x1034b2bc8 uv_run [/opt/homebrew/Cellar/libuv/1.47.0/lib/libuv.1.dylib]
36: 0x1002299dc node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
37: 0x100351ad4 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
38: 0x10035183c node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/21.5.0/bin/node]
39: 0x1002cae80 node::Start(int, char**) [/opt/homebrew/Cellar/node/21.5.0/bin/node]
40: 0x18b096b98 start [/usr/lib/dyld]
----- JavaScript stack trace -----
1: readFileSync (node:fs:453:20)
2: readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:680:7096)
3: QF (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:376)
4: file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2239:997
5: processTicksAndRejections (node:internal/process/task_queues:95:5)This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗