# IDEAS Notes based on ideas I've had. ## Token Usage Visualization - Per-turn token breakdown (input/output/cache) inline in conversation - Cumulative session totals in status bar - Estimated Cost of Usage ## Planning Mode - Activity mode distinction in TUI (Plan vs Execute), visible in status bar - Planner agent: has tool access (reads, search) but no write/exec permissions - Plan output as structured markdown (steps, files, acceptance criteria) - `:edit-plan` command to open plan in `$EDITOR` before execution - Explicit plan approval gate before transitioning to execution - Executor agent spawned with plan file + project context (not planning conversation) - Plan-step progress tracking (complete/in-progress/failed) visible in TUI - **Done when:** Can plan a task, review/edit the plan, then execute it as a separate activity ## Sub-Agents - `spawn_agent` tool, independent `ConversationTree` per sub-agent - Agent tree sidebar in TUI, navigable in Normal mode - Sub-agents follow same approval policy with hard deny on unpermitted actions - Plan executor refactored as a sub-agent specialization - **Done when:** Agent delegates to sub-agent, user can inspect it, result flows back ## Context Window Management - Token counting for outgoing payloads - Compaction strategy: summarize older turns, preserve full history in session log - Stable message prefix for prompt caching - **Done when:** Conversations run indefinitely without hitting context limits ## Automated Anomaly Notation - Similar to Jon's SESSION.md: https://github.com/jonhoo/configs/blob/master/agentic/AGENTS.md - Allows the agents to note an anomaly or bad design decision. ## Defered TODO list - Allow the user to notate things that should be fixed after the agent has iterated on its full loop. - Potentially add a way to iterate through the todo list at the end. ## Session Logging - JSONL `SessionWriter` with `Event` structure - Parent IDs, timestamps, token usage per event - Predictable file location with session IDs - Ability to resume prior session. - **Done when:** Session files are coherent, parseable, with token counts per turn ## Which-key like help - Show command chording in normal mode. - Help window slides up from bottom of screen.