From d314a7ad7cc40ffdb06dcfa5945c653bfddc32c0 Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Mon, 26 Oct 2026 11:20:30 -0400 Subject: [PATCH] Model-server runs: 64k window, summarise at ~23k tokens Matches the laptop Ollama setup (num_ctx 65536 on the model): requests stay readable within the agent's ~5-minute wait while big tool results still fit. Co-Authored-By: Claude Opus 5.5 --- dashboard/server/jobs.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dashboard/server/jobs.js b/dashboard/server/jobs.js index bc1dd95..389025d 100644 --- a/dashboard/server/jobs.js +++ b/dashboard/server/jobs.js @@ -152,11 +152,12 @@ function docStamp(slug) { /** Runs on our own model server (Ollama etc.): every model slot points at the chosen model, and the Anthropic key stays home. */ function runEnv() { if (!process.env.ANTHROPIC_BASE_URL) return undefined; - // Summarise the conversation at ~16k tokens (half of a 32k window): local models get unreliable on longer requests. + // Summarise at ~23k tokens (35% of the 64k window set on the Ollama model): a laptop reads ~100–150 tokens/s and the + // agent gives up on a request after 5 minutes, while the spare window leaves room for big tool results. const env = { ...process.env, ANTHROPIC_AUTH_TOKEN: process.env.ANTHROPIC_AUTH_TOKEN || "ollama", CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1", - CLAUDE_CODE_AUTO_COMPACT_WINDOW: process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW || "32768", - CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: process.env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE || "50", + CLAUDE_CODE_AUTO_COMPACT_WINDOW: process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW || "65536", + CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: process.env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE || "35", CLAUDE_CODE_MAX_OUTPUT_TOKENS: process.env.CLAUDE_CODE_MAX_OUTPUT_TOKENS || "8000", }; delete env.ANTHROPIC_API_KEY;