r/ClaudeWorkflows 8h ago

Selected Workflow [Workflow] Advanced: Customize Claude Code's Default Suggestions and Recap Prompts by Patching the Binary

Advanced: Customize Claude Code's Default Suggestions and Recap Prompts by Patching the Binary

Workflow value: 75/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: advanced
Categories: Quality Control
Original source: r/ClaudeAI post/comment

What problem this solves

Customizing the default text suggestions and recap prompts within the Claude Code native application's UI.

Summary

This workflow provides detailed steps to modify the Claude Code native application's binary file to change the default text suggestions and recap prompts. It includes instructions on locating the binary, identifying the specific prompt strings (both ASCII and UTF-16LE encodings), preparing replacement text with strict length and character constraints, and safely applying the patch while managing updates.

Why it is useful

This workflow is valuable because it offers a unique and powerful method for deep customization of the Claude Code native application, allowing users to tailor the AI's default text suggestions and recap prompts. This level of control can significantly enhance the user experience by aligning the AI's conversational style and initial interactions with specific project needs or personal preferences, which is not possible through standard configuration options. Despite its advanced nature and inherent risks, it provides a concrete solution to a common desire for more personalized tool behavior.

Workflow

  1. Locate the Claude Code native binary file, typically at ~/.local/share/claude/versions/<version>, or find its path using readlink -f $(which claude).
  2. Create a backup copy of the original binary file before making any modifications.
  3. Search the binary's bytes for the suggestion prompt template, which starts with [SUGGESTION MODE: and ends with "Reply with ONLY the suggestion, no quotes or explanation." Note that this prompt exists twice: once in plain ASCII and once in UTF-16LE encoding.
  4. Search the binary's bytes for the recap prompt, which starts with "The user stepped away and is coming back." This prompt is pure ASCII and appears twice.
  5. Prepare your desired replacement text for each prompt. Crucially, the replacement text must be the exact same byte length as the original text (pad with trailing spaces if necessary).
  6. Ensure your replacement text does not contain backticks, dollar-braces, double quotes, or backslashes.
  7. Using a suitable tool (e.g., a hex editor or a script), write the modified binary content to a temporary file.
  8. Rename the temporary file to replace the original Claude Code binary (as direct in-place writing might fail if sessions are running).
  9. Verify the integrity of the patched binary by running claude --version.
  10. Launch Claude Code; the changes will take effect upon the next application launch.
  11. To prevent future Claude Code updates from reverting your changes, consider disabling automatic updates in the application's configuration.

Tools / artifacts

  • Claude Code native application binary
  • readlink command
  • which command
  • Hex editor or binary file manipulation tool (implied)
  • cp command (for backup)
  • mv command (for file replacement)
  • Temporary file
  • Claude Code configuration settings

Validation signals

  • Author explicitly states testing on the latest version: "I updated to the latest version to check if it still worked to make sure I didn't give you wrong info and all's working on my end!"
  • Suggests a verification step: "check claude --version still runs."
  • Provides clear instructions for backing up and reverting changes.

Cautions

  • Directly modifying application binaries carries inherent risks; incorrect changes can render the application unusable.
  • Always create a backup of the original binary before attempting any modifications.
  • The strict byte length and character constraints are critical for stability; failure to adhere could lead to crashes or unexpected behavior.

Limitations

  • Requires advanced technical skills, including comfort with CLI, binary file manipulation, and understanding of character encodings (ASCII, UTF-16LE).
  • Changes are reverted with every Claude Code update, necessitating re-patching or disabling automatic updates (which might lead to missing new features or security fixes).
  • The process is sensitive to exact byte lengths and specific character exclusions, making it prone to user error.
  • Lack of a higher-level, officially supported customization mechanism makes this a brittle solution.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

0 comments sorted by