Repository navigation
Conversation
…t modules Search each native JavaScript and text module instead of only the entrypoint. Preserve module-local captures and literal text encoding, compose prompt edits with the update guard, and validate changed JavaScript before identity-checked repacking. Reproduce the 642 missing-prompt warnings reported in #1008 and eliminate them on Claude Code 2.1.280. Add regression coverage for chunk matching, text payloads, filters, edit composition, and parse failures.
Record the assigned pull request number in the Unreleased changelog.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughSystem-prompt processing now supports multiple source modules, including Bun Text-loader modules. Native customization stages prompt and update-guard edits by module, parses edited JavaScript sources, and includes combined edits in module-aware repacking. ChangesNative module system prompting
Priority: ⬆️ High Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant NativeCustomization
participant BunModuleCorpus
participant applySystemPromptsToSources
participant NativeUpdateGuard
participant JavaScriptParser
participant ModuleAwareRepacker
NativeCustomization->>BunModuleCorpus: Extract module metadata and sources
NativeCustomization->>applySystemPromptsToSources: Patch JavaScript and Text-loader sources
NativeCustomization->>NativeUpdateGuard: Check prompt-patched module sources
NativeCustomization->>JavaScriptParser: Parse edited JavaScript modules
NativeCustomization->>ModuleAwareRepacker: Repack combined module edits
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The reviewed prompt-processing and native-repacking changes show no identified issue that blocks merging. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit reads each module line, Comment |
|
Here's the output. The specific problem this fixes seems to be working, but if you look at the bottom it's still failing to apply a bunch of patches, However, those could be out of scope to this specific pull request since the issue it solves it appears to be working. ]$ claude --version
2.1.280 (Claude Code)
# rm -rf ~/.tweakcc/system-prompts/ ~/.tweakcc/config.json
# git log -n1
commit deb483910d76a095098de377eb42f13891cf6706 (HEAD, origin/fix-system-prompt-matching-1008)
Merge: 960ab20 d3fc4c2
Author: Mike <mike@piebald.ai>
Date: Fri Sep 25 14:01:18 2026 -0600
Merge branch 'main' into fix-system-prompt-matching-1008
# run tweakcc -ay
+ rm -rf ./dist/
+ npx pnpm install
Already up to date
Done in 2ms using pnpm v12.6.0
+ npx pnpm build:dev
$ tsdown --dts src/index.tsx src/lib/index.ts
ℹ tsdown v0.18.4 powered by rolldown v1.0.0-beta.57
ℹ entry: src/index.tsx, src/lib/index.ts
ℹ target: node20.0.0
ℹ tsconfig: tsconfig.json
ℹ Build start
ℹ Granting execute permission to dist/index.mjs
ℹ dist/index.mjs 256.01 kB │ gzip: 48.78 kB
ℹ dist/lib/index.mjs 3.64 kB │ gzip: 1.50 kB
ℹ dist/config-BiWIY3AR.mjs 390.08 kB │ gzip: 96.64 kB
ℹ dist/nativeInstallation-CzGpfZuH.mjs 50.45 kB │ gzip: 12.68 kB
ℹ dist/content-Cs7Fwod4.mjs 31.44 kB │ gzip: 7.89 kB
ℹ dist/lib/index.d.mts 11.00 kB │ gzip: 3.46 kB
ℹ dist/index.d.mts 0.01 kB │ gzip: 0.03 kB
ℹ 7 files, total: 742.63 kB
✔ Build complete in 827ms
+ TWEAKCC_CC_INSTALLATION_PATH=/home/claude/.npm-global/bin/claude
+ npx pnpm start -ay
$ node dist/index.mjs -ay
Applying saved customizations to Claude Code...
Configuration saved at: /home/claude/.tweakcc/config.json
Created 748 new prompt file(s):
...
Found Claude Code (native installation): /home/claude/.npm-global/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe
Version: 2.1.280
Pre-apply summary
Config: /home/claude/.tweakcc/config.json
Claude Code: 2.1.280
Patches below are what --apply will attempt (pattern match may still fail).
Always Applied:
• Verbose property (verbose-property) [default-on]
Token counter will show (2s · ↓ 169 tokens · thinking)
• Opusplan[1m] support (opusplan1m) [default-on]
Use the "Opus Plan 1M" model: Opus for planning, Sonnet 1M context for building
• Fix LSP support (fix-lsp-support) [default-on]
Enable/fix nascent LSP support
• Clear screen command (clear-screen) [default-on]
Register /clear-screen command (clear scrollback + redraw)
• Session color from env (session-color) [default-on]
Set session prompt bar color via TWEAKCC_SESSION_COLOR env var
• Keybinding customization (keybinding-customization) [default-on]
Force-enable custom keybindings when CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
Misc Configurable:
• Model customizations (model-customizations) [default-on]
Access all Claude models with /model, not just latest 3
• Show more items in select menus (show-more-items-in-select-menus) [default-on]
Show 25 items in select menus instead of default 5
• Patches applied indication (patches-applied-indication) [default-on]
Show "tweakcc patches applied" and tweakcc version inside CC
• Input chevron color (input-chevron-color) [default-on]
The input chevron changes color based on loading state (e.g. green when idle)
• Thinking block visibility (thinking-visibility) [default-on]
Thinking blocks outputted by the model will show without Ctrl+O
• AGENTS.md (and others) (agents-md) [default-on]
Support AGENTS.md and others in addition to CLAUDE.md
Features:
• Worktree mode (worktree-mode) [default-on]
Enable the EnterWorktree tool for isolated git worktree sessions
• Session memory (session-memory) [default-on]
Enable session memory (auto-extraction + past session search)
• MCP non-blocking (mcp-non-blocking) [default-on]
If you have MCP servers, CC startup will be much faster
• User message display (user-message-display)
User messages in the chat history will be styled
Loading system prompts...
Applying customizations...
patch: verbose: failed to find createElement with verbose spinner props
patch: opusplan1m: patchModeSwitchingFunction: failed to find mode switching pattern
patch: opusplan1m: failed to apply mode switching patch
patch: fixLspSupport: failed to find ensureServerStarted
patch: findCustomModelListInsertionPoint: failed to find custom model push
patch: writeShowMoreItemsInSelectMenus: failed to find locations
patch: patchesAppliedIndication: failed to find chalk variable
patch: thinkingVisibility: failed to find thinking visibility pattern
patch: agentsMd: failed to find CLAUDE.md reading function
patch: worktreeMode: failed to find worktree gate function pattern
patch: sessionMemory: failed to find extraction gate
patch: findTextComponent: failed to find text component
patch: userMessageDisplay: failed to find Text component
Patches applied (run with --show-unchanged to show all patches):
Always Applied:
✗ Verbose property
✗ Opusplan[1m] support
✗ Fix LSP support
✗ Clear screen command
✗ Session color from env
✗ Keybinding customization
Misc Configurable:
✗ Model customizations
✗ Show more items in select menus
✗ Patches applied indication
✗ Input chevron color
✗ Thinking block visibility
✗ AGENTS.md (and others)
Features:
✗ Worktree mode
✗ Session memory
✗ User message display
Customizations applied with some failures. |
Why
A fresh configuration on Claude Code 2.1.280 reports 642 missing system prompts, exactly reproducing the report in #1008. Prompt application searches only the 21 KB entrypoint, but the executable distributes its prompts across 1,975 JavaScript modules and embedded text assets. Resetting the local Markdown files cannot fix the missing search scope.
This addresses the prompt-loading failure in #1008, not the separate feature-patch failures or release request in that issue.
What changed
preventUpdateToUnsupportedVersionsis disabled.13) alongside JavaScript (1), while continuing to reject binary/file-loader assets regardless of filename.Validation
pnpm test— 593 passed, 5 skipped, including the compiled Bun multi-module round-trip tests.pnpm lint— passed.pnpm build— passed.Built the base (
f4d4681) and PR CLIs and rannode dist/index.mjs --apply --yes --patches "$PROMPT_IDS"against separate copies of the same Claude Code 2.1.280 executable, with isolatedTWEAKCC_CONFIG_DIRandTWEAKCC_CC_INSTALLATION_PATH.$PROMPT_IDScontained every ID from the 2.1.280 snapshot:2.1.280 (Claude Code)2.1.280 (Claude Code)Edited
agent-prompt-auto-mode-rule-reviewer(JavaScript) andsystem-prompt-autonomous-loop-check(text) in the isolated configuration, then rannode dist/index.mjs --apply --yes --patches agent-prompt-auto-mode-rule-reviewer,system-prompt-autonomous-loop-check. Both customizations applied without missing-prompt warnings; the repacked executable returned2.1.280 (Claude Code)from--version.Separate source-application/repacking checks on actual 2.1.280 and 2.1.282 artifacts verified edited JavaScript/text payloads, byte-identical unrelated modules, unchanged original executables, and successful
--versionstartup. A disposable 2.1.280 runtime probe read the edited text payload back exactly, including Unicode, backticks, and backslashes.Known limitations
ed6ad02) finds two separate snapshot mismatches: a build-specific worker path in Skill: /doctor slash command, and a hard-coded minifiedshow:WOsidentifier in System Reminder: Directory sync restored files mismatch. Those two warnings remain; this PR does not change that pending snapshot.Summary by CodeRabbit