From 0377951a04021e06eb55e3166466fd1d240e8076 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 17 Mar 2026 07:49:14 -0400 Subject: [PATCH] feat: context window size awareness for 1M+ models (#1086) GSD was designed around 200k context windows. With Opus 4.6 / Sonnet 4.6 shipping 1M context at standard pricing, GSD should adapt its strategies. Changes: - Add context_window config option (default: 200000, configurable to 1000000) - Expose context_window in init output so workflows can adapt behavior - Update execute-phase.md to note context-size-dependent strategies: - 200k: paths-only executor context, 10-15% orchestrator budget - 1M+: richer context passing, inline small phases, relaxed /clear - Context monitor already uses percentage-based thresholds (adaptive) Users can opt in via config.json: { "context_window": 1000000 } Addresses #1086 --- get-shit-done/bin/lib/core.cjs | 2 ++ get-shit-done/bin/lib/init.cjs | 1 + get-shit-done/workflows/execute-phase.md | 13 ++++++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/get-shit-done/bin/lib/core.cjs b/get-shit-done/bin/lib/core.cjs index 5038dc247..d195bfdfd 100644 --- a/get-shit-done/bin/lib/core.cjs +++ b/get-shit-done/bin/lib/core.cjs @@ -65,6 +65,7 @@ function loadConfig(cwd) { parallelization: true, brave_search: false, resolve_model_ids: false, // when true, resolve aliases (opus/sonnet/haiku) to full model IDs + context_window: 200000, // default 200k; set to 1000000 for Opus/Sonnet 4.6 1M models }; try { @@ -108,6 +109,7 @@ function loadConfig(cwd) { parallelization, brave_search: get('brave_search') ?? defaults.brave_search, resolve_model_ids: get('resolve_model_ids') ?? defaults.resolve_model_ids, + context_window: get('context_window') ?? defaults.context_window, model_overrides: parsed.model_overrides || null, }; } catch { diff --git a/get-shit-done/bin/lib/init.cjs b/get-shit-done/bin/lib/init.cjs index 9c9d35655..3d92bdc6b 100644 --- a/get-shit-done/bin/lib/init.cjs +++ b/get-shit-done/bin/lib/init.cjs @@ -31,6 +31,7 @@ function cmdInitExecutePhase(cwd, phase, raw) { // Config flags commit_docs: config.commit_docs, parallelization: config.parallelization, + context_window: config.context_window, branching_strategy: config.branching_strategy, phase_branch_template: config.phase_branch_template, milestone_branch_template: config.milestone_branch_template, diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index e5c6afe4d..58ddb3a46 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -191,8 +191,9 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true` 2. **Spawn executor agents:** - Pass paths only — executors read files themselves with their fresh 200k context. - This keeps orchestrator context lean (~10-15%). + Pass paths only — executors read files themselves with their fresh context window. + For 200k models, this keeps orchestrator context lean (~10-15%). + For 1M+ models (Opus 4.6, Sonnet 4.6), richer context can be passed directly. ``` Task( @@ -652,7 +653,13 @@ Only suggest the commands listed above. Do not invent or hallucinate command nam -Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (Task blocks). No context bleed. +Orchestrator: ~10-15% context for 200k windows, can use more for 1M+ windows. +Subagents: fresh context each (200k-1M depending on model). No polling (Task blocks). No context bleed. + +For 1M+ context models, consider: +- Passing richer context (code snippets, dependency outputs) directly to executors instead of just file paths +- Running small phases (≤3 plans, no dependencies) inline without subagent spawning overhead +- Relaxing /clear recommendations — context rot onset is much further out with 5x window