claude-agent-sdk-python icon indicating copy to clipboard operation
claude-agent-sdk-python copied to clipboard

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:

Open RomanLuo523 opened this issue 10 months ago • 1 comments

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: 2026-01-06T12:03:14.018042366Z RangeError: Maximum call stack size exceeded. 2026-01-06T12:03:14.018055546Z at DGB (/$bunfs/root/claude:12:28368) 2026-01-06T12:03:14.018064876Z at k (/$bunfs/root/claude:12:28713) 2026-01-06T12:03:14.018074116Z at s4 (/$bunfs/root/claude:11:8510) 2026-01-06T12:03:14.018082866Z at appendFileSync (/$bunfs/root/claude:12:1200) 2026-01-06T12:03:14.018089936Z at writeFn (/$bunfs/root/claude:12:28553) 2026-01-06T12:03:14.018097406Z at f (/$bunfs/root/claude:12:27941) 2026-01-06T12:03:14.018106366Z at write (/$bunfs/root/claude:12:28064) 2026-01-06T12:03:14.018114736Z at k (/$bunfs/root/claude:14:36) 2026-01-06T12:03:14.018122506Z at s4 (/$bunfs/root/claude:11:8510) 2026-01-06T12:03:14.018131016Z at appendFileSync (/$bunfs/root/claude:12:1200)

RomanLuo523 avatar Jan 06 '26 12:01 RomanLuo523

This stack overflow error (RangeError: Maximum call stack size exceeded in appendFileSync) was in a very old version of the bundled CLI. The SDK has been through many releases since then (currently v0.1.50 with CLI v2.1.81), and the CLI's logging and file writing code has been substantially rewritten.

If you're still experiencing this error on the latest version, please open a new issue with your current SDK version and reproduction steps. Closing as stale.

qing-ant avatar Mar 24 '26 08:03 qing-ant