context-reset-handler

Detect context window limits and generate structured handoff documents for session resets.

1|1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Cheggin/request-for-startups --skill context-reset-handler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-reset-handler
Source: https://github.com/Cheggin/request-for-startups/tree/main/skills/context-reset-handler
Command: npx skills add https://github.com/Cheggin/request-for-startups --skill context-reset-handler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect context window limits and perform clean resets with structured handoff documents for session continuity.

Core Features & Use Cases

  • Monitor token usage during agent execution and trigger a reset at 80% capacity to prevent failures.
  • Generate a handoff document at .harness/handoffs/{agent-id}-{timestamp}.md with four sections: Objective, Completed, In Progress, and Next Steps.
  • Stop the current agent session gracefully and start a new session with the handoff injected as initial context via a PostStart hook.
  • Read open GitHub Issues and recent PR comments to rebuild broader project context.
  • Validate handoff quality by ensuring all four sections are non-empty and include concrete references (file paths, issue numbers).

Quick Start

Trigger a graceful session reset when 80% of context is used and load the resulting handoff as the initial context for the next session.

Frequently Asked Questions about context-reset-handler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve AI agent session progress when hitting context window limits?

To preserve AI agent session progress, you generate a structured handoff document containing Objective, Completed, In Progress, and Next Steps sections, then reinitialize the session with that document injected as initial context.

What is a context window reset for long-running agent sessions?

A context window reset is a graceful session restart triggered at 80% token capacity that stops the current agent and starts a new one using a generated handoff document to maintain task continuity.

How do I monitor token usage and trigger a session reset before context failure?

Monitor token usage during agent execution and trigger a graceful reset at 80% capacity to prevent failures, ensuring the current session stops only after generating a structured handoff document.

Does the session handoff process work with GitHub issues and PR comments?

The session handoff process reads open GitHub Issues and recent PR comments to rebuild broader project context, and validates handoff quality by ensuring all four sections include concrete references like file paths and issue numbers.

How do I reinitialize an AI agent session with previous context via PostStart hook?

Reinitialize an AI agent session by stopping the current execution gracefully and starting a new session with the handoff document injected as initial context using a PostStart hook.