Skip to content

CUE_BYPASS=1 does not do what both docs say it does #136

Description

@NagyVikt

CUE_BYPASS=1 is documented in two places as a full escape hatch:

  • docs/shell-install.md:77-82"Skip cue entirely … makes cue exec the real binary directly without touching the profile, materializer, or config dir. Use it when you need a raw claude session for debugging."
  • docs/launch.md:207"CUE_BYPASS=1 claude — exec the real binary directly; no resolve, no materialize, no profile."

Nothing implements that. Every reader in src/:

Location What it actually does
launch-loader.ts:160 returns null — suppresses the startup spinner
launch.ts:142 (added in #133) skips the CUE_SMART_SUBSET argv fold
claude-classifier.ts:168, discover.ts:1522, discover.ts:2240, profile-draft-skill.ts:107 set it on a spawn; none read it

So CUE_BYPASS=1 claude --version still runs the full pipeline: resolve, materialize, profile, config dir. The documented debugging escape hatch does not exist.

Why it matters

This is what made #133 possible. claude-classifier.ts set CUE_BYPASS=1 on its spawn and its docstring stated the flag made cue's shim "transparent" — a reasonable belief given the docs. It wasn't, so the spawn re-entered cue launch and folded its own argv into the next classification prompt. Measured on a live machine: a 67KB command line with the prompt template repeated 10 times, and ~2.9GB across 7 concurrent classifier processes.

#133 fixed the loop but deliberately did not widen CUE_BYPASS — that is a behavioral change that didn't belong in a memory fix. It added a second narrow reader instead, which arguably makes the flag's meaning muddier, not clearer.

Options

  1. Implement the contract. Short-circuit at the top of launch.run(): when CUE_BYPASS === "1", resolve via findRealAgentBin() and exec with the passthrough args, returning its exit code. Matches both docs, and makes the launch.ts:142 guard redundant (keep it as defense-in-depth or drop it).
    • Check first that discover.ts / profile-draft-skill.ts want a raw agent — they appear to (they spawn claude -p for classification/drafting), but confirm.
  2. Correct the docs to describe the three narrow behaviors the flag actually has, and rename or split the flag.

(1) is preferable — the documented behavior is the useful one, and it removes a whole cue launch boot from every classifier spawn.

Note

MAX_LAUNCH_DEPTH = 3 bounds the process nesting, so this is a waste/correctness issue rather than a runaway-recursion one.

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