Skip to content

Commit 9adc809

Browse files
authored
fix(code): add 1m context window beta header (#1332)
## Problem two problems: 1. every session starts with ~150k tokens eaten 2. we support 1M context now, but the agent still compacts at 200k (which means code is unusable lol) <!-- Who is this for and what problem does it solve? --> <!-- Closes #ISSUE_ID --> ## Changes does not solve the first problem!!! but adds the `context-1m-2025-08-07` beta header to claude session options so we can actually use 1m context docs: https://platform.claude.com/docs/en/build-with-claude/context-windows related issue: Kilo-Org/kilocode#6300 <!-- What did you change and why? --> <!-- If there are frontend changes, include screenshots. --> ## How did you test this? manually ![Screenshot 2026-03-25 at 8.21.50 PM.png](https://app.graphite.com/user-attachments/assets/2df977a8-3dc2-4054-91a2-230afd740195.png) <!-- Describe what you tested -- manual steps, automated tests, or both. --> <!-- If you're an agent, only list tests you actually ran. -->
1 parent e8aa7f2 commit 9adc809

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/agent/src/adapters/claude/session

packages/agent/src/adapters/claude/session/options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export function buildSessionOptions(params: BuildOptionsParams): Options {
238238

239239
const options: Options = {
240240
...params.userProvidedOptions,
241+
betas: ["context-1m-2025-08-07"],
241242
systemPrompt: params.systemPrompt ?? buildSystemPrompt(),
242243
settingSources: ["user", "project", "local"],
243244
stderr: (err) => params.logger.error(err),

0 commit comments

Comments
 (0)