[FEATURE] Claude Code: Comprehensive Prompt Improvements (Tested & Working)

Status Closed — not planned
Reported on v2.0.76
Maintainer reply None cached
Activity 6 comments · opened Jan 7, 2026 · closed Feb 27, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I've been using Claude Code extensively and made several modifications that significantly improve the experience. All changes have been tested and are working well.

Problems Addressed:

  1. Compaction loses critical context - After auto-compaction, Claude forgets user corrections, repeats mistakes, doesn't realize it's resuming
  2. Model acknowledges instructions but doesn't follow them - Rationalizes back to different approaches after understanding user hints
  3. Over-complication - Takes simple hints and pattern-matches to complex solutions
  4. Unwanted flags - Adds --dry-run, --verbose etc. when not requested

Changes Made:

Compaction System (l71 function):

  • Replaced terse resumption message with structured "Auto-Compaction Notice"
  • Clear framing: "You are RESUMING an existing task, not starting a new one"
  • Reminders to check todo list, verify files exist, ask when uncertain

Summarization Prompt (aY0 function):

  • Added section 7: "User Rejections and Corrections (VERBATIM)"
  • Added section 8: "Last 5 Relevant Messages" in terminal format (● Tool, ⎿ output, > user message)
  • Emphasis on preserving corrections verbatim to avoid repeating mistakes
  • Fixed numbering (original had duplicate section 6's) (2.0.76)

New System Prompt Section - "Follow user instructions exactly":

  • Follow instructions EXACTLY without adding unrequested flags/options
  • Don't rationalize back to alternatives after acknowledging user input
  • Try the SIMPLEST interpretation first
  • "If they say 'use X', try literally using X before investigating complex alternatives"
  • User corrections ARE the answer - don't keep suggesting rejected approaches

Tone & Communication Style section:

  • Conversational, collaborative framing
  • "Skilled colleague" rather than "formal assistant"

Other improvements:

  • Removed auto-generated Co-Authored-By in commits (user preference)
  • Updated knowledge cutoff year reference
  • Various wording improvements for clarity
  • Skills are now tracked during summarization and reminded for reload after compaction (addresses #13919)

Didn't publish publicly due to copyright considerations. I can provide the patch file which you can apply directly against 2.0.76 to test. Note that I removed the PR instructions since I don't use CC for PRs and it just unnecessarily clutters the context.

P.S. I would really appreciate if Claude Code were open-sourced. Contributing improvements like these would be much easier through proper pull requests rather than patching minified JavaScript.

Proposed Solution

Change the system prompt, plan mode prompt, compaction prompt and compaction resumption prompt. Can provide patch file if requested.

Alternative Solutions

CLAUDE.md, doesn't help, and system prompt takes precedence, undermining CLAUDE.md efforts.

Priority

Low - Nice to have

Feature Category

API and model interactions

Use Case Example

  1. Literally any scenario

Additional Context

Not posting patch file due to copyright, will add if approved. This is to be interpreted like a pull request that fixes existing issues (see #13919) in addition to what I experienced myself. This is not a bug report in and of itself.

View original on GitHub ↗

6 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13919
  2. https://github.com/anthropics/claude-code/issues/16073
  3. https://github.com/anthropics/claude-code/issues/7663

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

xdevs23 · 9 months ago

I vote for not closing as duplicate because I'm requesting specific changes to the prompts for which I have a patch for. I don't know if others have requested that as well, but this is a specific enhancement request (see it as a pull request) rather than a bug report (because the bug reports already exist).

xdevs23 · 8 months ago

If you want to try it out right away, install Nix, enable Flakes and run:

NIXPKGS_ALLOW_UNFREE=1 nix run --impure git+https://codeberg.org/xdevs23/claude-code-10x
github-actions[bot] · 7 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.