docs: Context Rotation harness-side V0 plan - #5
Merged
Conversation
Planning-only design for how the Hermes/Virgil runtime should detect oversized conversations, build/inject a compact checkpoint into a fresh internal thread, continue safely, and stop retrying on usage_limit_reached. Docs-only; no runtime code, tests, provider config, or secrets changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔎 Lint report:
|
3ndym10n
marked this pull request as ready for review
June 21, 2026 02:46
This was referenced Jun 21, 2026
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.
Summary
Planning-only (docs-only) design for harness-side Context Rotation V0 in the Hermes/Virgil runtime.
Designs how the runtime should:
usage_limit_reached.Grounded in the real codebase seams (
agent/context_engine.py,agent/context_compressor.py,agent/conversation_loop.py,agent/error_classifier.py,agent/agent_runtime_helpers.py,gateway/run.py,gateway/session.py,gateway/slash_commands.py,gateway/config.py, and the Virgil precedent ingateway/virgil_preflight_gate.py).Per Cogitator NousResearch#831: the live detect/rotate/inject/continue loop belongs in the Hermes/Virgil harness; Cogitator will later supply the checkpoint builder, bridge, and hard usage-limit classification. This plan defines the harness seam those plug into, plus a harness-local fallback so V0 can ship first.
Scope
docs/CONTEXT_ROTATION_HARNESS_V0_PLAN.md.Contents
Six-step loop design · exact files/functions · token-counting locations · recommended thresholds (rotate at 0.90, above the 0.75 compress watermark) · checkpoint build + injection ·
/newvs auto-rotation relationship ·usage_limit_reachedretry short-circuit · feature flag (default off) · required tests · rollout plan · rollback boundary · forbidden surfaces · risk class · recommended 3-PR implementation prompt.Validation
git diff --check→ cleangit status --short→ exactly one file added:docs/CONTEXT_ROTATION_HARNESS_V0_PLAN.md🤖 Generated with Claude Code