feat(runtime): add Session context-window caps - #203
Conversation
…ontext Review repairs on top of #203: - thread/start now resolves an explicit contextWindow against the model's published window before the thread is persisted, matching thread/execution/update, instead of letting the first Turn reject it - ThreadStartParams.contextWindow accepts null in the protocol schema, as the dispatcher already did; generated types regenerated - the TUI guide's command table gains the /context row
|
Merged today as b9a945e ("Merge repaired PR #203") with your commit intact. This was the most complete external contribution we have had: the cap really reaches the compaction gate and request trimming (we measured the trigger moving from ~222k to ~49k for a 64k cap on a 256k model), the per-Turn freeze holds for queued Turns and forks, the v17 migration round-trips, and the protocol change was regenerated rather than hand-edited. Three small repairs went on top (4c68774): |
Description
Closes #153.
The reasoning controls from #161/#162 already cover the first half of the issue. This adds the remaining manual context-window control as a Session selection for future Turns, shared by Desktop and the interactive CLI.
Behavior
null/autofollows the selected model's published context windowExecutionProfileChanges Made
ExecutionSelection, canonical Session metadata, Thread projection, SQLite migration v17, and App Server protocolcontextWindow; explicitnullclears the override/context 64kand/context autoto the TUI, including humank/mparsingVerification
ruff checkon all changed Python filesruff format --checkon all changed Python filesnpm test— 31 files, 195 tests passednpm run buildnpm run check:protocol,npm run typecheck, andnpm run lintChecklist