Skip to content

cc 2.1.112 on current main: compiles cleanly, then dies at startup with "Cannot set property errorCode of #<VR8> which has only a getter" #11499

Description

@proggeramlug

On current main (f3828c7ec), claude-code 2.1.112 compiles cleanly but still dies at startup — with a different error from the one in #11301:

Uncaught (in promise) TypeError: Cannot set property errorCode of #<VR8> which has only a getter
    at OBY (<anonymous>)
    at L (<anonymous>)
    at new __AnonShape_6e5125e2965aca2f (<anonymous>)
    at L (<anonymous>)
    at new __AnonShape_0f21577b01597d8e (<anonymous>)
    at L (<anonymous>)
    at N8 [0x5d9bd60f333f] (<anonymous>)

--version works (2.1.112 (Claude Code)); --help and doctor both fail identically. This is the current blocker for any cc-based runtime measurement.

First: the reported compile failure does NOT reproduce

A parallel lane reported "ENTRY MODULE FAILED TO COMPILE — REFUSING TO LINK" for this bundle on a90cd9d44, and a separate IR dump found a function __44728 with undefined SSA values. Neither appears here. On f3828c7ec:

COMPILE_RC=0            (2 h 38 m wall)
Wrote executable: /root/rig9831/ccMAIN
Binary size: 313.4MB

The full 676-line log (kept unfiltered) contains no __44728, no verifier failure, and no "REFUSING TO LINK". Its only notices are the expected AOT-unsupported sites (3 Function(...), 1 eval(...), 1 import(...), process._rawDebug) plus one unknown identifier 'MessageEvent' warning. Built with compiler and runtime from the same tree (--no-auto-optimize --enable-wasm-runtime), run under an exclusive heavy-job lock with 28 GB of headroom reserved — the earlier failure was at 24.2 GB peak while other lanes compiled, so resource starvation is the likelier explanation for that report than a codegen defect.

The construct

XX = class XX extends Error {
  constructor(q, K) { super(q); this.errorUri = K, this.name = this.constructor.name }
  get errorCode() { return this.constructor.errorCode }   // INSTANCE accessor, getter-only
};
VR8 = class VR8 extends XX {};
VR8.errorCode = "invalid_request";        // a STATIC assignment on the class object
Sy6 = class Sy6 extends XX {}; Sy6.errorCode = "invalid_client";
// …a dozen more subclasses in the same shape

The getter is an instance accessor (it lives on XX.prototype). VR8.errorCode = … is a static set on the constructor. Perry reports that the class object has a getter-only errorCode, i.e. the instance accessor is visible on the static side, so the static assignment hits it and throws. In node the same code runs and hasOwnProperty is true on both the class and the prototype.

The new __AnonShape_* frames match the anonymous class … extends XX {} expressions, and L is esbuild's __esm lazy-init wrapper, so this runs during module initialisation.

Characterisation

Note for #11301 / #11469

The commits named there as fixing #11174, c025870294 and 256925ac46, are not ancestors of f3828c7ec — git merge-base --is-ancestor reports both absent from current main. Worth confirming where they actually live before treating that fix as landed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions