feat: upgrade agent SDK to 0.2.92 with 1M context and 200k auto-compact

Use sonnet[1m] for full 1M context window and set auto-compact at 200k
tokens to keep costs down while preserving access to extended context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-04-04 23:47:17 +03:00
parent 3608f05233
commit db3440f662
3 changed files with 65 additions and 9 deletions

View File

@@ -449,6 +449,7 @@ async function runQuery(
append: globalClaudeMd,
}
: undefined,
model: 'sonnet[1m]',
allowedTools: [
'Bash',
'Read',
@@ -623,7 +624,10 @@ async function main(): Promise<void> {
// Credentials are injected by the host's credential proxy via ANTHROPIC_BASE_URL.
// No real secrets exist in the container environment.
const sdkEnv: Record<string, string | undefined> = { ...process.env };
const sdkEnv: Record<string, string | undefined> = {
...process.env,
CLAUDE_CODE_AUTO_COMPACT_WINDOW: '200000',
};
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const mcpServerPath = path.join(__dirname, 'ipc-mcp-stdio.js');