agentsop-session-state-hygiene
CommunityClear the noise, keep the signal.
System Documentation
What problem does it solve?
It prevents multi-turn coding agents from silently derailing by detecting when stale context (“context bleed”) is biasing outputs, and then resetting or trimming the session state at the smallest correct cut.
Core Features & Use Cases
- When to activate context hygiene: targets topic shifts, window/length warnings, and “weird behavior” like repeating corrected mistakes or referencing removed decisions.
- Four-step SOP across tools: recognize the symptom, save durable “keepers,” clear/trim with the right blast radius, then restart with a focused summary.
- Cross-framework consistency: maps the same discipline onto Aider (/clear,/reset,/drop), Claude Code (/clear), CrewAI (memory=False and re-instantiation), and LangGraph (new thread_id, update_state, subgraph isolation).
Use cases include: finishing feature A then switching to a bugfix within the same session, recovering from repeated edit failures after bloated history, and debugging when “it still remembers” due to persistent stores.
Quick Start
Ask the AI to apply Session-State Hygiene by naming the context-bleed symptom, saving a one-paragraph durable summary, clearing the session state appropriately for your tool, and restarting with the objective.
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: agentsop-session-state-hygiene Download link: https://github.com/agentsope/SkillAlchemy/archive/main.zip#agentsop-session-state-hygiene Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.