claude-code - 💡(How to fix) Fix Claude Code reads the boot files then ignores them and ships broken shit (Windows app harness) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56009Fetched 2026-05-05 06:00:35
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

  1. Deploy 1: shipped broken kiosk. "Kiosk not enrolled" error.
  2. Deploy 2: added auto-clear of persisted flag on error screen.

Root Cause

Spent an afternoon getting fucked because Claude read CLAUDE.md at session start, ran an audit that literally listed both auth variants of the same function (fetchRestaurantConfig — auth REST, vs fetchRestaurantConfigPublic — anonymous GraphQL), wrote a plan referencing those variants, then when it actually typed code 30+ minutes later it imported the wrong fucking one — the auth-required read for an anonymous cross-subdomain context that CLAUDE.md spells out on line 9:

Fix Action

Fix / Workaround

Suggested mitigation

RAW_BUFFERClick to expand / collapse

Environment: Claude Code, Windows desktop app harness. Claude Opus 4.7 (1M context). Long mixed session.


The bug

Spent an afternoon getting fucked because Claude read CLAUDE.md at session start, ran an audit that literally listed both auth variants of the same function (fetchRestaurantConfig — auth REST, vs fetchRestaurantConfigPublic — anonymous GraphQL), wrote a plan referencing those variants, then when it actually typed code 30+ minutes later it imported the wrong fucking one — the auth-required read for an anonymous cross-subdomain context that CLAUDE.md spells out on line 9:

"Lab tenant: bbdd.space (WP on admin.bbdd.space, SPA on bbdd.space)"

That line is the exact constraint the bug violated. Customer-facing kiosk runs on bbdd.space. Auth REST endpoint is on admin.bbdd.space. Different subdomains = no shared cookies. The auth-required read was always going to 401 cross-origin. Spec was clear. Agent had read it. Agent then forgot.

What happened next

Cue three deploys of band-aid bullshit chasing the symptom instead of the cause:

  1. Deploy 1: shipped broken kiosk. "Kiosk not enrolled" error.
  2. Deploy 2: added auto-clear of persisted flag on error screen.
  3. Deploy 3: added 3 navigation buttons + made the SiteLayout wrapper reactive.

Each one made the failure mode different but didn't fix the actual problem. The agent only went back to consult the boot files after I shouted at it.

Root cause (per the agent's own words)

"I read them once at the start of the session and then default to implementation mode, where I stop cross-referencing them against the code I'm writing. ... I treated the boot files as documentation I'd already absorbed instead of a checklist I should be re-grepping every time I add a network call. ... It's the same failure mode as someone reading a spec, nodding, then writing code from memory and missing the part of the spec that constrains exactly the line they're on."

Severity

This broke production-bound software for half a day while iterating live deploys. Boot files framed as authoritative; agent treats them as one-shot reading instead of a recurring constraint check. Trust-eroding.

Suggested mitigation

Train / prompt the agent to re-grep the boot files (CLAUDE.md, project memory, audits in the session) at every auth- or network-boundary decision — not just at session start. Specifically: any time the agent writes a fetch, import of a network-related function, or new origin/credentials code path, force a constraint re-check.

The boot files aren't the problem. The agent reads them once, nods, then types from memory and misses the part of the spec that constrains the exact line it's on. Fix your goddamn agent's discipline.

extent analysis

TL;DR

The agent should re-check the boot files at every auth- or network-boundary decision to prevent importing the wrong function variant.

Guidance

  • Identify all network-related functions and auth-boundary decisions in the code to determine where the agent needs to re-check the boot files.
  • Implement a constraint re-check mechanism that forces the agent to review the boot files (CLAUDE.md, project memory, audits) before writing code that involves network calls or auth-related functions.
  • Consider adding a prompt or training data to the agent to ensure it understands the importance of re-grepping the boot files at every relevant decision point.
  • Review the agent's implementation mode to prevent it from defaulting to writing code from memory without cross-referencing the boot files.

Example

No code snippet is provided as the issue does not contain specific code examples that can be used to illustrate the solution.

Notes

The suggested mitigation focuses on training the agent to re-check the boot files at every relevant decision point, rather than relying on a one-shot reading at the start of the session. This approach may require adjustments to the agent's implementation mode and training data.

Recommendation

Apply the suggested mitigation by training the agent to re-grep the boot files at every auth- or network-boundary decision, as this addresses the root cause of the issue and can help prevent similar problems in the future.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Claude Code reads the boot files then ignores them and ships broken shit (Windows app harness) [1 comments, 2 participants]