cantrip icon indicating copy to clipboard operation
cantrip copied to clipboard

js_run tool crashes when using fetch

Open deepfates opened this issue 9 months ago • 0 comments

Description

The js_run tool crashes with a QuickJS memory error when attempting to use fetch().

Reproduction

bun run examples/js_agent.ts
› Can you fetch https://example.com

Error

Aborted(Assertion failed: list_empty(&rt->gc_obj_list), at: ../../vendor/quickjs-ng/quickjs.c,1954,JS_FreeRuntime)
QuickJSUseAfterFree: Lifetime not alive

Notes

  • The js_run tool has allowFetch: true by default
  • The js tool (persistent REPL) does not have this issue since it doesn't support fetch
  • Likely an issue with @sebastianwessel/quickjs or how we're managing the sandbox lifecycle

deepfates avatar Feb 04 '26 17:02 deepfates