[BUG] crashing
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?
Update(query_executor.cpp)
⎿ Updated query_executor.cpp with 12 additions and 4 removals
447 * @param registry Registry to check health status
448 * @return Health status (true=healthy, false=unhealthy or unknown)
449 *
450 - * @note If health status unknown or expired, returns true (optimistic)
450 + * @note Issue #13 fixed: Configurable behavior on unknown health
451 + * @note If fail_open_on_unknown_health=true, returns true when unknown (optimistic)
452 + * @note If fail_open_on_unknown_health=false, returns false when unknown (fail-safe)
453 * @note For critical queries, caller should enforce stricter health checks
454 */
455 bool is_backend_healthy(
...
456 ) const {
457 if (registry == nullptr) {
458 logger->warn("Registry pointer null, cannot check health for {}", backend_name);
459 - return true; // Optimistic: assume healthy if we can't check
459 + // Use configured behavior for unknown/error cases
460 + return fail_open_on_unknown_health;
461 }
462
463 auto health = registry->is_healthy(backend_name);
464
465 if (!health.has_value()) {
466 - logger->debug("Health status unknown for backend: {}, allowing query", backend_name);
467 - return true; // Optimistic: allow if unknown
466 + // Issue #13: Use configurable fail-open vs fail-safe behavior
467 + if (fail_open_on_unknown_health) {
468 + logger->debug("Health status unknown for backend: {}, allowing query (fail-open)", backend_name);
469 + } else {
470 + logger->warn("Health status unknown for backend: {}, blocking query (fail-safe)", backend_name);
471 + }
472 + return fail_open_on_unknown_health;
473 }
474
475 if (!health.value()) {
Update(query_executor.cpp)
∴ Thought for 1s (ctrl+o to show thinking)
✢ Making DDL blocking configurable… (esc to interrupt · ctrl+t to show todos · 2m 10s · ↓ 10.2k tokens)
⎿ Next: Fix inefficient TRUNCATE regex pattern (query_executor.cpp)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 file +70 -27
⏵⏵ accept edits on (shift+tab to cycle)
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: Array length must be a positive integer of safe magnitude.
at get (B:/~BUN/root/claude.exe:790:8127)
at <anonymous> (B:/~BUN/root/claude.exe:792:1548)
at onRender (B:/~BUN/root/claude.exe:811:6556)
at resetAfterCommit (B:/~BUN/root/claude.exe:787:334)
at kXH (B:/~BUN/root/claude.exe:697:39502)
at qZ (B:/~BUN/root/claude.exe:697:38874)
at Iq (B:/~BUN/root/claude.exe:697:35437)
at Y0 (B:/~BUN/root/claude.exe:695:4818)
at SV (B:/~BUN/root/claude.exe:697:32481)
at bXH (B:/~BUN/root/claude.exe:695:25182)
785 | $ npm install --save-dev react-devtools-core
786 | .trim()+
787 | );else throw H}_m=oDI.default({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(H){if(typeof H.onComputeLayout==="function")H.onComputeLayout();if(H.isStaticDirty){if(H.isStaticDirty=!1,typeof H.onImmediateRender==="function")H.onImmediateRender();return}H.onRender?.()},getChildHostContext(H,$){let A=H.isInsideText,L=$==="ink-text"||$==="ink-virtual-text";if(A===L)return H;return{isInsideText:L}},shouldSetTextContent:()=>!1,createInstance(H,$,A,L){if(L.isInsideText&&H==="ink-box")throw Error("<Box> can\u2019t be nested inside <Text> component");let I=H==="ink-text"&&L.isInsideText?"ink-virtual-text":H,D=TrH(I);for(let[f,E]of Object.entries($)){if(f==="children")continue;if(f==="style"){if(pg$(D,E),D.yogaNode)lg$(D.yogaNode,E);continue}if(f==="internal_transform"){D.internal_transform=E;continue}if(f==="internal_static"){D.internal_static=!0;continue}cg$(D,f,E)}return D},createTextInstance(H,$,A){if(!A.isInsideText)throw Er | ... truncated).repeat(y);if(F)k=pH.dim(k);let x=(RL(M,I)(E.right)+
788 | ).repeat(y);if(Z)x=pH.dim(x);let l=U?(w?E.bottomLeft:"")+E.bottom.repeat(N)+(Y?E.bottomRight:""):"";if(U&&A.style.borderText?.position==="bottom"){let n=A.style.borderText;l=f0I(l,n.content,n.align,n.offset,E.bottom)}let d=U?RL(W,I)(l):void 0;if(U&&X)d=pH.dim(d);let s=Q?1:0;if(O)L.write(H,$,O,{transformers:[]});if(w)L.write(H,$+s,k,{transformers:[]});if(Y)L.write(H+D-1,$+s,x,{transformers:[]});if(d)L.write(H,$+f-1,d,{transformers:[]})}},B0I;var W0I=_(()=>{RD();n9H();qrH();E0I=K(L0I(),1),Qif={dashed:{top:"\u254C",left:"\u254E",right:"\u254E",bottom:"\u254C",topLeft:" ",topRight:" ",bottomLeft:" ",bottomRight:" "}};B0I=Jif});var Uif=(H,$)=>{let A=H.childNodes[0]?.yogaNode;if(A){let L=A.getComputedLeft(),I=A.getComputedTop();$=
789 | .repeat(I)+ag$($,L)}return $},G0I=(H,$,{offsetX:A=0,offsetY:L=0,transformers:I=[],skipStaticElements:D,theme:f})=>{if(D&&H.internal_static)return;let{yogaNode:E}=H;if(E){if(E.getDisplay()===lK.None)return;let B=A+E.getComputedLeft(),W=L+E.getComputedTop(),G=I;if(typeof H.internal_transform==="function")G=[H.internal_transform,...I];if(H.nodeName==="ink-text"){let V=NrH(H);if(V.length>0){let X=i9H(V),F=eDI(E);if(X>F){let Z=H.style.textWrap??"wrap";V=Fm(V,F,Z)}V=Uif(H,V),$.write(B,W,V,{transformers:G})}return}let M=!1;if(H.nodeName==="ink-box"){B0I(B,W,H,$,f);let V=H.style.overflowX==="hidden"||H.style.overflow==="hidden",X=H.style.overflowY==="hidden"||H.style.overflow==="hidden";if(V||X){let F=V?B+E.getComputedBorder(X9.Left):void 0,Z=V?B+E.getComputedWidth()-E.getComputedBorder(X9.Right):void 0,Q=X?W+E.getComputedBorder(X9.Top):void 0,U=X?W+E.getComputedHeight()-E.getComputedBorder(X9.Bottom):void 0;$.clip({x1:F,x2:Z,y1:Q,y2:U}),M=!0}}if(H.nodeName==="ink-root"||H.nodeName==="ink-box"){for(let V of H.childN | ... truncated
790 |
RangeError: Array length must be a positive integer of safe magnitude.
at get (B:/~BUN/root/claude.exe:790:8127)
at B:/~BUN/root/claude.exe:792:1548
at onRender (B:/~BUN/root/claude.exe:811:6556)
at B:/~BUN/root/claude.exe:691:2514
at B (B:/~BUN/root/claude.exe:691:1921)
at W (B:/~BUN/root/claude.exe:691:1957)
at B:/~BUN/root/claude.exe:691:2032
What Should Happen?
Update(query_executor.cpp)
⎿ Updated query_executor.cpp with 12 additions and 4 removals
447 * @param registry Registry to check health status
448 * @return Health status (true=healthy, false=unhealthy or unknown)
449 *
450 - * @note If health status unknown or expired, returns true (optimistic)
450 + * @note Issue #13 fixed: Configurable behavior on unknown health
451 + * @note If fail_open_on_unknown_health=true, returns true when unknown (optimistic)
452 + * @note If fail_open_on_unknown_health=false, returns false when unknown (fail-safe)
453 * @note For critical queries, caller should enforce stricter health checks
454 */
455 bool is_backend_healthy(
...
456 ) const {
457 if (registry == nullptr) {
458 logger->warn("Registry pointer null, cannot check health for {}", backend_name);
459 - return true; // Optimistic: assume healthy if we can't check
459 + // Use configured behavior for unknown/error cases
460 + return fail_open_on_unknown_health;
461 }
462
463 auto health = registry->is_healthy(backend_name);
464
465 if (!health.has_value()) {
466 - logger->debug("Health status unknown for backend: {}, allowing query", backend_name);
467 - return true; // Optimistic: allow if unknown
466 + // Issue #13: Use configurable fail-open vs fail-safe behavior
467 + if (fail_open_on_unknown_health) {
468 + logger->debug("Health status unknown for backend: {}, allowing query (fail-open)", backend_name);
469 + } else {
470 + logger->warn("Health status unknown for backend: {}, blocking query (fail-safe)", backend_name);
471 + }
472 + return fail_open_on_unknown_health;
473 }
474
475 if (!health.value()) {
Update(query_executor.cpp)
∴ Thought for 1s (ctrl+o to show thinking)
✢ Making DDL blocking configurable… (esc to interrupt · ctrl+t to show todos · 2m 10s · ↓ 10.2k tokens)
⎿ Next: Fix inefficient TRUNCATE regex pattern (query_executor.cpp)
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 file +70 -27
⏵⏵ accept edits on (shift+tab to cycle)
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: Array length must be a positive integer of safe magnitude.
at get (B:/~BUN/root/claude.exe:790:8127)
at <anonymous> (B:/~BUN/root/claude.exe:792:1548)
at onRender (B:/~BUN/root/claude.exe:811:6556)
at resetAfterCommit (B:/~BUN/root/claude.exe:787:334)
at kXH (B:/~BUN/root/claude.exe:697:39502)
at qZ (B:/~BUN/root/claude.exe:697:38874)
at Iq (B:/~BUN/root/claude.exe:697:35437)
at Y0 (B:/~BUN/root/claude.exe:695:4818)
at SV (B:/~BUN/root/claude.exe:697:32481)
at bXH (B:/~BUN/root/claude.exe:695:25182)
785 | $ npm install --save-dev react-devtools-core
786 | .trim()+
787 | );else throw H}_m=oDI.default({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(H){if(typeof H.onComputeLayout==="function")H.onComputeLayout();if(H.isStaticDirty){if(H.isStaticDirty=!1,typeof H.onImmediateRender==="function")H.onImmediateRender();return}H.onRender?.()},getChildHostContext(H,$){let A=H.isInsideText,L=$==="ink-text"||$==="ink-virtual-text";if(A===L)return H;return{isInsideText:L}},shouldSetTextContent:()=>!1,createInstance(H,$,A,L){if(L.isInsideText&&H==="ink-box")throw Error("<Box> can\u2019t be nested inside <Text> component");let I=H==="ink-text"&&L.isInsideText?"ink-virtual-text":H,D=TrH(I);for(let[f,E]of Object.entries($)){if(f==="children")continue;if(f==="style"){if(pg$(D,E),D.yogaNode)lg$(D.yogaNode,E);continue}if(f==="internal_transform"){D.internal_transform=E;continue}if(f==="internal_static"){D.internal_static=!0;continue}cg$(D,f,E)}return D},createTextInstance(H,$,A){if(!A.isInsideText)throw Er | ... truncated).repeat(y);if(F)k=pH.dim(k);let x=(RL(M,I)(E.right)+
788 | ).repeat(y);if(Z)x=pH.dim(x);let l=U?(w?E.bottomLeft:"")+E.bottom.repeat(N)+(Y?E.bottomRight:""):"";if(U&&A.style.borderText?.position==="bottom"){let n=A.style.borderText;l=f0I(l,n.content,n.align,n.offset,E.bottom)}let d=U?RL(W,I)(l):void 0;if(U&&X)d=pH.dim(d);let s=Q?1:0;if(O)L.write(H,$,O,{transformers:[]});if(w)L.write(H,$+s,k,{transformers:[]});if(Y)L.write(H+D-1,$+s,x,{transformers:[]});if(d)L.write(H,$+f-1,d,{transformers:[]})}},B0I;var W0I=_(()=>{RD();n9H();qrH();E0I=K(L0I(),1),Qif={dashed:{top:"\u254C",left:"\u254E",right:"\u254E",bottom:"\u254C",topLeft:" ",topRight:" ",bottomLeft:" ",bottomRight:" "}};B0I=Jif});var Uif=(H,$)=>{let A=H.childNodes[0]?.yogaNode;if(A){let L=A.getComputedLeft(),I=A.getComputedTop();$=
789 | .repeat(I)+ag$($,L)}return $},G0I=(H,$,{offsetX:A=0,offsetY:L=0,transformers:I=[],skipStaticElements:D,theme:f})=>{if(D&&H.internal_static)return;let{yogaNode:E}=H;if(E){if(E.getDisplay()===lK.None)return;let B=A+E.getComputedLeft(),W=L+E.getComputedTop(),G=I;if(typeof H.internal_transform==="function")G=[H.internal_transform,...I];if(H.nodeName==="ink-text"){let V=NrH(H);if(V.length>0){let X=i9H(V),F=eDI(E);if(X>F){let Z=H.style.textWrap??"wrap";V=Fm(V,F,Z)}V=Uif(H,V),$.write(B,W,V,{transformers:G})}return}let M=!1;if(H.nodeName==="ink-box"){B0I(B,W,H,$,f);let V=H.style.overflowX==="hidden"||H.style.overflow==="hidden",X=H.style.overflowY==="hidden"||H.style.overflow==="hidden";if(V||X){let F=V?B+E.getComputedBorder(X9.Left):void 0,Z=V?B+E.getComputedWidth()-E.getComputedBorder(X9.Right):void 0,Q=X?W+E.getComputedBorder(X9.Top):void 0,U=X?W+E.getComputedHeight()-E.getComputedBorder(X9.Bottom):void 0;$.clip({x1:F,x2:Z,y1:Q,y2:U}),M=!0}}if(H.nodeName==="ink-root"||H.nodeName==="ink-box"){for(let V of H.childN | ... truncated
790 |
RangeError: Array length must be a positive integer of safe magnitude.
at get (B:/~BUN/root/claude.exe:790:8127)
at B:/~BUN/root/claude.exe:792:1548
at onRender (B:/~BUN/root/claude.exe:811:6556)
at B:/~BUN/root/claude.exe:691:2514
at B (B:/~BUN/root/claude.exe:691:1921)
at W (B:/~BUN/root/claude.exe:691:1957)
at B:/~BUN/root/claude.exe:691:2032
Error Messages/Logs
Steps to Reproduce
please review crash
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗