diff --git a/IDEAS.md b/IDEAS.md index ef8fb0f..1067777 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -361,48 +361,3 @@ Flag in session creation: `echo 'new claude /project ephemeral' | 9p write agent Daemon marks session as ephemeral. When backend exits cleanly (not crash), transition to `stopped` or `exited` instead of auto-restart. Optionally auto-cleanup after N seconds. -## Context Utilization State - -Daemon polls backend for context usage and exposes it via `agent/{session}/usage`. - -### Backend-Specific Queries - -**Kiro CLI**: Send `/context show` as prompt, parse response for token usage (e.g., "17426/200000 (8.7%)") - -**Claude/Others**: Write "N/A" or "-" (no context query support) - -### Polling Strategy - -Daemon or monitor process: -- Every 1-2 minutes, check `agent/{session}/backend` -- If Kiro: send `/context show`, parse output, write to `usage` -- If unsupported: write "-" to `usage` - -Avoids interrupting user prompts. Cache last known value between polls. - -### 9P Filesystem - -Add to each session: -``` -agent//usage # "17426/200000 (8.7%)" or "N/A" -``` - -### UI Integration - -- **Assist**: display usage in session list, color-code by threshold -- **anvillm/anvilweb**: add usage column -- **Color scheme**: green (<50%), yellow (50-80%), red (>80%) - -### Automatic Actions - -When usage exceeds threshold: -- Warn user at 80% -- Suggest restart or conversation compaction at 90% -- Optionally auto-restart (preserves session ID, fresh context) - -### Conversation Compaction - -High usage workflow: -1. Summarize conversation history (via bot or separate summarizer) -2. Restart session with summary as initial context -3. Usage drops, session continues with same ID