agloop_get_compaction_context
Retrieve compaction recovery context including compaction count, pending decisions, last delegation, and recovery hints after VS Code context compaction to restore agent state.
Instructions
Get compaction recovery context: compaction count, pending decision, last delegation, recovery hint. Critical after VS Code context compaction.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agloop_mcp/server.py:91-97 (handler)The tool `agloop_get_compaction_context` is defined as an MCP tool handler in `src/agloop_mcp/server.py`. It uses the `_sm()` helper to retrieve the compaction context from the `StateManager` and returns it as a JSON string.
@mcp.tool() def agloop_get_compaction_context() -> str: """Get compaction recovery context: compaction count, pending decision, last delegation, recovery hint. Critical after VS Code context compaction.""" ctx = _sm().get_compaction_context() if not ctx: return json.dumps({"error": "No compaction context"}) return json.dumps(asdict(ctx), indent=2)