RangeError: Invalid Date ... toISOString (non-deterministic) on claude startup or non-interactive model

Resolved 💬 2 comments Opened Dec 12, 2025 by pchalasani Closed Dec 16, 2025

Version: 2.0.67

Repro:

claude -p "3 + 4 = "

Output:

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
RangeError: Invalid Date
    at toISOString (unknown)
    at Mv (/$bunfs/root/claude:3875:3172)
    at jFT (/$bunfs/root/claude:3875:4442)
    at async <anonymous> (/$bunfs/root/claude:3875:9283)
    at async aHA (/$bunfs/root/claude:3875:141)
    at async KC_ (/$bunfs/root/claude:3875:9079)
    at processTicksAndRejections (native:7:39)
7

The command works correctly and returns the expected result, but the error message in stderr is unexpected.

Also a similar error happens even without -p. And it's non-deterministic, i.e. does not always happen.

View original on GitHub ↗

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