Per-machine context-window override (GITNEXUS_CONTEXT_WINDOW)#7
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonis tracked/shared, so committing1000000there would mis-fire the nudge for teammates on a 200k model.Make it a per-machine env override instead:
loadHookConfigappliesGITNEXUS_CONTEXT_WINDOWlast: env > file > default; invalid / ≤0 ignored.gitnexus-hooks.json(a missing file already falls through to thecatch→ 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