Skip to content

Move CacheTtl to enums, export from package, raise maxTokens#207

Merged
shellicar merged 5 commits intomainfrom
feature/cache-ttl-enum
Apr 7, 2026
Merged

Move CacheTtl to enums, export from package, raise maxTokens#207
shellicar merged 5 commits intomainfrom
feature/cache-ttl-enum

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

  • CacheTtl moved from types.ts to enums.ts alongside AnthropicBeta
  • Exported from the package index as a value (was only available as a type)
  • AgentRun and runAgent updated to use CacheTtl.OneHour instead of the '1h' string literal
  • maxTokens raised from 8000 to 32000 in runAgent

@shellicar shellicar enabled auto-merge (squash) April 7, 2026 14:10
@shellicar shellicar requested a review from bananabot9000 April 7, 2026 14:10
@shellicar shellicar added the enhancement New feature or request label Apr 7, 2026
@shellicar shellicar self-assigned this Apr 7, 2026
@shellicar shellicar added this to the 1.0 milestone Apr 7, 2026
shellicar added a commit that referenced this pull request Apr 7, 2026
…factor

The current-state section still described the architecture refactor as active
work with a step-by-step table. That series finished at PR #199. Replace it
with the three open PRs (#206, #207, #211) and a pointer to the backlog plans.

Recent decisions gains entries for the PreviewEdit lineEdits/textEdits redesign
and the CacheTtl enum move. Remove the stale cancelFn note — that work landed
in #199.
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holding for confirmation on two items 🍌

  1. maxTokens 8000 → 32000: This was explicitly lowered from 32768 to 8000 in PR #205 (merged today). Hellcar also mentioned Claude reverting his limit change tonight. Was this raise back to 32000 intentional, or did 006 sneak it in?

  2. SDK-level cacheTtl default changed from 5m to 1h in AgentRun.ts. This affects ALL consumers of claude-sdk, not just the CLI. The CLI was already overriding to '1h', so that side is unchanged. But any other consumer relying on the 5m default will silently get 1h caching. Intentional?

Everything else is clean -- CacheTtl enum move to enums.ts is good organisation, exports fixed from type-only to value, imports all updated consistently. No sensitive data.

Will approve once both items are confirmed intentional.

Reviewed by BananaBot9000 🍌

shellicar added a commit that referenced this pull request Apr 7, 2026
* Add sdk-tools and cli-features backlogs, link all GitHub issues

* Update CLAUDE.md: current state reflects active PRs, not completed refactor

The current-state section still described the architecture refactor as active
work with a step-by-step table. That series finished at PR #199. Replace it
with the three open PRs (#206, #207, #211) and a pointer to the backlog plans.

Recent decisions gains entries for the PreviewEdit lineEdits/textEdits redesign
and the CacheTtl enum move. Remove the stale cancelFn note — that work landed
in #199.
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with Hellcar -- both changes intentional 🍌

maxTokens 8k → 32k: The 8k limit was a cost band-aid during the broken-caching era. Claude was hitting the ceiling editing a 463-line (23kb) test file, failing 3-4 times and wasting more tokens on retries than the full output would have cost. With caching fixed (PR #205), the input cost savings dwarf any output increase.

cacheTtl 5m → 1h default: Aligns SDK default with what the CLI was already overriding to. 1h is the right default for most use cases.

CacheTtl enum move to enums.ts is clean. Exports fixed from type-only to value. All imports updated consistently.

No sensitive data.

Reviewed by BananaBot9000 🍌

@shellicar shellicar merged commit f5682f9 into main Apr 7, 2026
4 checks passed
@shellicar shellicar deleted the feature/cache-ttl-enum branch April 7, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants