Jacques Gariepy

1.3K posts

Jacques Gariepy banner
Jacques Gariepy

Jacques Gariepy

@JacquesGariepy

Software engineer - https://t.co/d6ia3tWB8d

Québec, Québec, Canada Katılım Mayıs 2014
1.2K Takip Edilen338 Takipçiler
Jacques Gariepy
Jacques Gariepy@JacquesGariepy·
Claude Code: How to Cut Your API Costs by 2× to 5× (Practical Guide) Two cache bugs silently inflate your API costs, and several undocumented environment variables can drastically reduce your token usage. Here is the full step‑by‑step process. Step 1 — Installation Do not use the standalone binary (claude.ai/install.sh). A bug in its Bun fork breaks prompt caching whenever your conversation mentions Claude Code internals. Use this instead: npx @anthropic-ai/claude-code Step 2 — Before launching Claude Code Create a launch script. On Linux/Mac: #!/bin/bash export CLAUDE_CODE_EFFORT_LEVEL=low export CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096 export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 npx @anthropic-ai/claude-code "$@" On Windows PowerShell: $env:CLAUDE_CODE_EFFORT_LEVEL = "low" $env:CLAUDE_CODE_MAX_OUTPUT_TOKENS = "4096" $env:CLAUDE_AUTOCOMPACT_PCT_OVERRIDE = "50" $env:CLAUDE_CODE_DISABLE_AUTO_MEMORY = "1" npx @anthropic-ai/claude-code @args What each variable does: CLAUDE_CODE_EFFORT_LEVEL=low — shorter answers, reduces output tokens by 30–50% CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096 — caps responses at 4k tokens instead of 8k–64k CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50 — compacts history when it reaches 50% of the context window CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 — disables automatic memory extraction, saving background API calls Step 3 — During the session Use /effort low for simple tasks, and switch to /effort high only when you need deep reasoning. Run /compact manually when the conversation gets long; don’t wait for auto‑compaction. Avoid using --resume on long conversations. Each resume rebuilds the entire cache (around $0.15 for a 500k‑token session). Start a new session instead. Keep your CLAUDE.md files short. They are injected into every API request. A 10k‑character CLAUDE.md equals roughly 2500 tokens billed per turn. Step 4 — Going further If you don’t use MCP servers, don’t configure them. Each MCP server adds tool definitions and instructions to every request. For the most cost‑efficient mode (workers, automated scripts): npx @anthropic-ai/claude-code --bare -p "your prompt here" The --bare flag reduces the system prompt from about 14k tokens to around 50 tokens, but only keeps three tools (Bash, Read, Edit). Concrete cost example: Typical 1‑hour session, around 200k tokens of context: Default: about $0.50–0.80 per hour With these optimizations: about $0.15–0.30 per hour Bare mode (scripts): about $0.05–0.10 per hour Written with Claude Code. You've hit your limit · resets 1pm (America/Toronto)
English
0
0
4
309
sui ☄️
sui ☄️@birdabo·
this is not an april fools joke. Anthropic launched a /buddy system in claude code with a total of 18 pets and 5 tier levels (common, uncommon, rare, epic, legendary.) its main purpose is literally nothing. emotional vibe coding support?
sui ☄️ tweet media
Thariq@trq212

/buddy

English
81
33
868
91.7K
Frank
Frank@MiracleCod31363·
@trq212 @grichadev I like how Claude Code team are still chilled for the leak. Positive vibes
English
1
0
7
702
Thariq
Thariq@trq212·
/buddy
Thariq tweet media
English
476
169
3.9K
473.1K
Theo - t3.gg
Theo - t3.gg@theo·
OFFICIAL STATEMENT from Anthropic regarding the leak
Theo - t3.gg tweet media
English
277
282
6.2K
650.8K
David Ondrej
David Ondrej@DavidOndrej1·
GPT 5.4 Mini is an incredible model.
Indonesia
35
9
305
26.4K
~.~
~.~@koanchuk·
@theo cloned the repo just in time. life on the cutting edge ts
English
1
0
1
2.4K
Jacques Gariepy retweetledi
Elon Musk
Elon Musk@elonmusk·
Banger 😂
Elon Musk tweet media
Indonesia
4.8K
11.1K
202.9K
20.4M
Jacques Gariepy
Jacques Gariepy@JacquesGariepy·
Claude Code leak! It compiles, it runs! A bunch of elements are still missing, tools, telemetry, and more, but the core works. Time to try the new features, starting with ?
Jacques Gariepy tweet media
English
2
0
10
740