HackerTrans
TopNewTrendsCommentsPastAskShowJobs

g4cg54g54

no profile record

Submissions

Tell HN: Claude-code prompt-cache fix

3 points·by g4cg54g54·3 mesi fa·1 comments

Tell HN: Claude-code prompt-cache workaround/fix

2 points·by g4cg54g54·3 mesi fa·0 comments

comments

g4cg54g54
·2 mesi fa·discuss
funfact: enabling DNS sec NOW will fix your domain instantly if dnssec was disabled before

-> no idea if that also "heals" anyone who had dnssec on before.

-> no idea if maybe they need to roll back something and then rebreak the new dnssec i made a minute later lol...
g4cg54g54
·2 mesi fa·discuss
same vain as https://news.ycombinator.com/item?id=47952722 ?

  HERMES.md in commit messages causes requests to route to extra usage billing  
  1203 points | 21 hours ago | 524 comments

@bcherny well need a bit more than a "Fixed" here... https://github.com/anthropics/claude-code/issues/53262#issue...
g4cg54g54
·3 mesi fa·discuss
> Please keep the feedback coming

if only there were a place with 9.881 feedbacks waiting to be triaged...

and that maybe not by a duplicate-bot that goes wild and just autocloses everything, just blessing some of the stuff there with a "you´ve been seen" label would go a long way...
g4cg54g54
·3 mesi fa·discuss
chargers of that size generally have there own internal (sometimes even shared by multiple receptacles) batteries
g4cg54g54
·3 mesi fa·discuss
subusers supposedly get it automatic again after the fix (and now also with `DISABLE_TELEMETRY=1`)

but if you are api user you must set `ENABLE_PROMPT_CACHING_1H` as i understood

and when using your own api (via `ANTHROPIC_BASE_URL`) ensure `CLAUDE_CODE_ATTRIBUTION_HEADER=0` is set as well... https://github.com/anthropics/claude-code/issues/50085

and check out the other neckbreakers ive found pukes lots of malicious compliance by feels... :/

[BUG] new sessions will *never* hit a (full)cache #47098 https://github.com/anthropics/claude-code/issues/47098

[BUG] /clear bleeds into the next session (what also breaks cache) #47756 https://github.com/anthropics/claude-code/issues/47756

[BUG] uncachable system prompt caused by includeGitInstructions / CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS -> git status https://github.com/anthropics/claude-code/issues/47107
g4cg54g54
·3 mesi fa·discuss
seems we have been heard ;)

  2.1.108
  Added ENABLE_PROMPT_CACHING_1H env var to opt into 1-hour prompt cache TTL on API key, Bedrock, Vertex, and Foundry (ENABLE_PROMPT_CACHING_1H_BEDROCK is deprecated but still honored),
  and FORCE_PROMPT_CACHING_5M to force 5-minute TTL
docs are not updated yet, directly from the changelog^

And this is "a bit better" - but seemingly still nowhere close to what subscribers get where main thread, agent, initial and follow-up messages may all get there own ?intelligent? 5min or 1h decision :/
g4cg54g54
·3 mesi fa·discuss
a git status + "recent commits" (that will _always_ change) https://github.com/anthropics/claude-code/issues/47107

and a missing cache-mark that will make skills & project-claude.md cachemiss every time too https://github.com/anthropics/claude-code/issues/47098

  TLDR: for now launch using `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 claude "Hello"`
  https://news.ycombinator.com/item?id=47754795
g4cg54g54
·3 mesi fa·discuss
Honorable mention also to https://github.com/cnighswonger/claude-code-cache-fix which "addresses even more issues with /resume"
g4cg54g54
·3 mesi fa·discuss
not to mention that "the outlook failure" seems to have been a layer 8 problem?

(think i picked up some line about not being aware how to use it in offline mode / calling this out as an "error" while it was the expected configuration at the time)

and the toilet problem being as banal as "well, you need to wait for the green ready light to turn on..." (and this just taking a bit longer than expected on the first go)
g4cg54g54
·3 mesi fa·discuss
currently "clear makes it worse" https://github.com/anthropics/claude-code/issues/47098 + https://github.com/anthropics/claude-code/issues/47107

launching with `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 claude "Hello"` till those are fixed seems to be th way
g4cg54g54
·3 mesi fa·discuss
would like to know this too ;D

there is env.ENABLE_PROMPT_CACHING_1H_BEDROCK - but that is - as the name says "when using Bedrock"

for the raw API the docs are also clear -> "ttl": "1h" https://platform.claude.com/docs/en/build-with-claude/prompt...

but how to make claude-code send that when paying by API-key? or when using a custom ANTHROPIC_BASE_URL? (requests will contain cache_control, but no ttl!)
g4cg54g54
·3 mesi fa·discuss
from looking at the raw requests, that cant seem right?

its all "cache_control": { "type": "ephemeral" } there is no "ttl" anywhere.

// edit: cc_version=2.1.104.f27
g4cg54g54
·6 mesi fa·discuss
~/.claude.json with {"hasCompletedOnboarding":true} is the key, then ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN work as expected
g4cg54g54
·6 mesi fa·discuss
siderailing here - but got one that _actually_ works?

in particular i´d like to call claude-models - in openai-schema hosted by a reseller - with some proxy that offers anthropic format to my claude --- but it seems like nothing gets to fully line things up (double-translated tool names for example)

reseller is abacus.ai - tried BerriAI/litellm, musistudio/claude-code-router, ziozzang/claude2openai-proxy, 1rgs/claude-code-proxy, fuergaosi233/claude-code-proxy,
g4cg54g54
·7 mesi fa·discuss
https://pve.proxmox.com/wiki/PVE-zsync is just that, also PBS (https://pbs.proxmox.com/wiki/Main_Page) has "live restore" what can start a kvm after just the first few megs are restored
g4cg54g54
·8 mesi fa·discuss
without an airport near "my current location" is my goto. is there a direct link for this? (otherwise i may hack together some userscript that clicks that button for me...)

"my assumption" would have been some x/y/angle/zoom params on the url, maybe even with some of the settings encoded in... (autorotate, render-radius or terrain height would be first to come to mind)

my "not getting any tiles" must have been 2 or 3 days ago - and from the last time i had to mess with tiles i do remember that to be fairly ugly in regards to performance/scaling so i feel you ;)

also addon after trying the "direct link to an airport": - this still loads at the random-US-airport first. with some tweaking there is likely an entire tilefetch you can save^

thx!
g4cg54g54
·8 mesi fa·discuss
had it bookmarked since the last share, but had noted the world-tiles would regularly not load, seems okay (and with colors?) now, but maybe that could need some low-detail fallback when arcgisonline servers are busting? - some 16k image to fill all the black void?

also "copy this view" does nothing (neither location nor any settings, gives just the bare link)
g4cg54g54
·9 mesi fa·discuss
panels up to 2000W is legal, the 800w limit is actual net input, you can even battery in-between (or use it directly)
g4cg54g54
·10 mesi fa·discuss
sorry, but insert spacebar heater xkcd here :D https://xkcd.com/1172/

pretty sure your old behavior was the broken one tho - i vaguely remember fugling with this to "fullscreen correctly" for a claude-in-docker-in-cygwin-via-MSYS2 a while ago
g4cg54g54
·10 mesi fa·discuss
https://en.wikipedia.org/wiki/DNS_rebinding protection will stop this from working "hopefully" ;)

but `--host-resolver-rules` may work, https://chromium.googlesource.com/chromium/src/+/main/net/ba... @terry_hc