claude-agent with a Claude subscription doesn't set cache.ttl, so warming pings every 4 minutes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start at priceSource() in the claude-agent provider, which already detects whether the login is a subscription, and follow how each model's settings object is assembled so cache.ttl can be set to 1h for subscription logins. Then check the warming interval logic that falls back to 4 minutes when cache.ttl is absent. Done looks like GET /api/model returning settings.cache.ttl on every claude-agent model under a subscription login, with warming keep-alives spaced an hour apart.
Written by the indexing model from the issue text.
Description
Description
With claude-agent signed in through a Claude subscription, the prompt cache lasts an hour, but none of its models have settings.cache.ttl. So warming's "auto" interval falls back to 4 minutes: about a dozen keep-alive requests an hour instead of one, each sending the full context and using up subscription quota. Background compaction is hit the same way: once a session has been idle for 5 minutes it no longer precomputes the summary, even though the cache is still there.
The workaround is adding "settings": { "cache": { "ttl": "1h" } } to every claude-agent model in the config. priceSource() in the claude-agent provider already knows when the login is a subscription, so it could set cache.ttl there.
Plugins
None
OpenCode version
2.3.2
Steps to reproduce
- Sign in to claude-agent with a Claude subscription
- Set
"warming": truein the config GET /api/model: none of the claude-agent models havesettings.cache.ttl
Screenshot
No response
Operating System
Windows 11
Terminal
OpenChamber desktop app
- Dominant language
- TypeScript
- Stars
- 228k
- Forks
- 31k
- Avg merge
- 3h 22m
- Merged PRs (30d)
- 476
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2Openarea/desktop platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anomalyco/opencode#66079 · 1 comment ·
Maintainers usually reply within 1 day
-
area/mcp platform/windows status/repro-simulated type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#66073 · 1 comment ·
Maintainers usually reply within 1 day
-
area/mcp platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#65997 · 1 comment ·
Maintainers usually reply within 1 day
-
@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrastPossibly taken @KhadeerBasha1232 claimed this today. Openstatus/repro-plausible
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anomalyco/opencode#65923 · 2 comments ·
Maintainers usually reply within 1 day
-
area/core platform/windows type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
anomalyco/opencode#65880 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidofinance/validator-ejector#233 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude Major
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/twake-mail-admin#742 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenSlides/openslides-client#6728 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100