Skip to content

Per-machine context-window override (GITNEXUS_CONTEXT_WINDOW)#7

Merged
ReidenXerx merged 1 commit into
mainfrom
feat/context-window-env-override
Jul 16, 2026
Merged

Per-machine context-window override (GITNEXUS_CONTEXT_WINDOW)#7
ReidenXerx merged 1 commit into
mainfrom
feat/context-window-env-override

Conversation

@ReidenXerx

Copy link
Copy Markdown
Owner

The task-core compaction nudge fires at contextPressureThreshold × contextWindowTokens. That window is model-specific — a 1M-context session vs a teammate's 200k model — and .gnkit/gitnexus-hooks.json is tracked/shared, so committing 1000000 there would mis-fire the nudge for teammates on a 200k model.

Make it a per-machine env override instead:

export GITNEXUS_CONTEXT_WINDOW=1000000   # your shell → all your repos, teammates unaffected
  • loadHookConfig applies GITNEXUS_CONTEXT_WINDOW last: env > file > default; invalid / ≤0 ignored.
  • Dropped the no-config early-return so the override also applies in repos with no gitnexus-hooks.json (a missing file already falls through to the catch → defaults kept).

Precedes propagating task-core to the repos — lets me leave the committed default at 200k and set 1M per-machine. 61/61 tests.

🤖 Generated with Claude Code

… over the shared config

The task-core pressure nudge fires at contextPressureThreshold × contextWindowTokens. That window
is MODEL-specific (a 1M-context session vs a teammate's 200k model), and .gnkit/gitnexus-hooks.json
is tracked/shared — so committing 1000000 there would mis-fire the nudge for every teammate on a
200k model. Make the window a per-machine env override instead:

  export GITNEXUS_CONTEXT_WINDOW=1000000   # in your shell → applies to all your repos

loadHookConfig now applies GITNEXUS_CONTEXT_WINDOW last (env > file > default); invalid/≤0 values
are ignored. Dropped the no-config early-return so the env override also applies in repos without a
gitnexus-hooks.json (a missing file already falls through to the catch → defaults). 61/61 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ReidenXerx
ReidenXerx merged commit 751a2f0 into main Jul 16, 2026
@ReidenXerx
ReidenXerx deleted the feat/context-window-env-override branch July 16, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant