Launcher to run GLM 5.2 in Claude Code harness (full launcher with all features: thinking summaries, context icon, markdown copy) A developer released 'claudemax', a launcher for the Claude Code harness that restores extended-thinking summaries on Opus 4.7/4.8, re-enables the context-usage icon in VS Code, and adds a 'Copy as Markdown' icon to messages. The launcher applies three independent fixes via environment variables, patching the extension's webview bundle idempotently on each launch. | /usr/bin/env bash | | | claudemax - Claude Code launcher that combines three unofficial fixes: | | | | | | 1. Restores extended-thinking summaries on Opus 4.7 / 4.8, where the | | | "Thinking" section otherwise renders empty in the VS Code extension and | | | headless -p/SDK. Done by injecting --thinking-display summarized into the | | | launch args - the one lever that is NOT interactivity-gated. Edits nothing. | | | 2. Restores the always-visible context-usage icon in the VS Code chat input. | | | Recent extension builds 2.1.165+ hide that icon until you have used | | | 50% of the context window; with the 1M window that is ~500k tokens, so it | | | is effectively never shown. There is no env/CLI lever for this, so unlike | | | fix 1 this wrapper idempotently patches the extension's webview bundle on | | | each launch, flipping the threshold so the icon shows at any usage level. | | | Because it re-applies every launch, it survives extension updates. | | | 3. Adds a single-click "Copy as Markdown" icon to every message and a floating | | | "copy conversation" icon in the VS Code chat; the icon flips to a checkmark | | | only when the copy truly lands. Like fix 2 there is no env/CLI lever, so this | | | wrapper idempotently appends a self-contained block to the webview bundle | | | index.js + index.css each launch; it fails safe the controls simply do | | | not appear if the markup moves and survives extension updates. | | | | | | This single launcher carries every fix, each independently switchable by an | | | environment variable all on by default : CC THINKING DISPLAY=omitted fix 1 , | | | CC PATCH CONTEXT ICON=0 fix 2 , CC PATCH MD COPY=0 fix 3 . E.g. for thinking | | | summaries only, set CC PATCH CONTEXT ICON=0 AND CC PATCH MD COPY=0. | | | | | | NOTE: unlike fix 1, fixes 2 and 3 DO edit the extension's bundled webview | | | files 2 patches index.js in place; 3 appends a block to index.js + index.css . | | | Those edits are idempotent and ownership-marked, snapshotted once to | | | index.js.bak-cc-workarounds emergency restore only , written atomically a | | | failed write leaves the original untouched , best-effort it never blocks the | | | launch , reconciled per file every launch, and toggle-able with | | | CC PATCH CONTEXT ICON=0 / CC PATCH MD COPY=0 or CC WORKAROUNDS=0 / CC RECONCILE=0 . | | | | | | Use it: | | | - VS Code official "Claude Code" extension : set "claudeCode.claudeProcessWrapper" | | | to the FULL path of this file, then reload the window. In a multi-root | | | .code-workspace this setting is window-scoped, so put it in the workspace | | | file's "settings" block or User settings , not a folder .vscode/settings.json. | | | - VS Code third-party "Claude Code Chat" : set "claudeCodeChat.executable.path". | | | - Terminal: run claudemax in place of claude . | | | | | | Toggle off defaults in parentheses : | | | export CC THINKING DISPLAY=omitted hide thinking summaries summarized | | | export CC PATCH CONTEXT ICON=0 leave the context-usage icon as-is 1 | | | export CC PATCH MD COPY=0 no copy controls / webview append 1 | | | export CC WORKAROUNDS=0 master: disable every fix 1 | | | export CC RECONCILE=0 do not touch the webview bundle 1 | | | export CC SCRUB ROUTING=1 force the default Anthropic account 0 | | | | | | The real claude must be installed. This wrapper finds it automatically; if it | | | cannot, set CLAUDE REAL BIN to the full path of your real claude binary. | | | set -euo pipefail | | | --- Locate the real claude binary ----------------------------------------- | | | self="$ readlink -f "$0" 2 /dev/null || echo "$0" " | | | Process-wrapper convention: the official VS Code extension invokes the wrapper | | | as