Skip to content

NtTestAlert/claude-thinking-summary-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-desktop-wrapper

A tiny Go shim that injects fixed CLI flags into every invocation of the Claude Code binary bundled inside the Claude desktop app on Windows. Also works on VSCode and potentially other IDE integrations, if you wrap the cli version's exe (-Target param).

Why

The desktop app launches its own embedded claude.exe and gives you no way to pass CLI flags to it. Shell aliases and .bashrc/.zshrc don't apply — the app CreateProcesses the exe directly.

This repo solves that by renaming the real binary to claude-real.exe and dropping a tiny wrapper claude.exe in its place. The wrapper prepends your flags, forwards stdio, and propagates the exit code.

Default injected flags: --thinking-display summarized (restores the summarized-thinking display that Claude Code hides by default on newer models). Change them in main.go.

Layout

main.go         # ~25-line Go wrapper
install.ps1     # Idempotent installer — patches every versioned app dir

Build & install

# 1. Build the wrapper
cd $env:USERPROFILE\.claude\claude-wrapper   # or wherever you cloned this
go build -ldflags="-s -w" -o claude-wrapper.exe main.go

# 2. Install (renames claude.exe -> claude-real.exe, drops wrapper in place)
powershell -ExecutionPolicy Bypass -File .\install.ps1

Then restart the desktop app.

The installer walks every %APPDATA%\Claude\claude-code\X.Y.Z\ directory and patches each one. It's idempotent — safe to re-run.

What gets patched: -Target

By default the installer only patches the desktop-app-bundled claude. The native standalone CLI at ~\.local\bin\claude.exe (the one you launch from terminals) is left alone, because shell aliases / PATH shims usually handle that case.

Pick what to patch with -Target:

.\install.ps1                # desktop app only (default)
.\install.ps1 -Target cli    # native CLI only
.\install.ps1 -Target all    # both

Wrapper exe resolution

The installer looks for claude-wrapper.exe in:

  1. ~\.claude\claude-wrapper\claude-wrapper.exe (the default build location).
  2. The script's own directory ($PSScriptRoot) as a fallback — so building and installing from a cloned repo dir works too.

After a desktop-app update

The desktop app unpacks each new Claude Code release into a fresh claude-code\X.Y.Z\ directory, which won't have the wrapper. Re-run install.ps1 after any update.

If you want this automated, wire it into a login script or a scheduled task that runs at logon.

Changing the injected flags

Edit this line in main.go:

args := append([]string{"--thinking-display", "summarized"}, os.Args[1:]...)

Rebuild and re-run install.ps1.

Uninstall

In each %APPDATA%\Claude\claude-code\X.Y.Z\:

Remove-Item claude.exe
Rename-Item claude-real.exe claude.exe

Or just let the next desktop-app update clobber it — the fresh version dir will have an unpatched claude.exe.

Caveats

  • Windows only. The desktop app on macOS/Linux uses a different launch mechanism.
  • The wrapper is ~1.5 MB (static Go binary). The real claude.exe is ~245 MB, so the size cost is negligible.
  • If Anthropic changes the embedded-binary path or launch mechanism, this breaks. It's a hack, not a supported integration.

License

MIT

About

Wrapper for claude executable to patch in thinking-display flag (desktop and cli)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages