Session memory for AI coding agents — records decisions and dead ends as they happen, and tells you when what you wrote stops being true
CogSession defines 8 tools with complete input schemas and descriptions. Naming follows verb_noun convention (session_init, session_checkpoint, session_load, etc.), which is clear and consistent. Descriptions are substantive (100-250 chars), explaining WHAT each tool does and WHEN to use it. However, parameter descriptions are sparse or missing context. For example, session_update's 'type' enum is well-defined, but many parameters lack guidance on format/constraints. Output schemas are not documented, callers cannot predict response structure. Error handling is absent from tool definitions; no guidance on recovery paths. Security considerations (file path validation, permission checks) are not visible in tool specs. Overall: solid naming and descriptions, but incomplete schemas and no error guidance.
Save the current session state to disk. CALL THIS at 70-80% context. Writes: handoff.md, tasks.json, dead_ends.md, assumptions.md, environment.json, architecture.mermaid, session_log.jsonl. Also auto-writes handoff.md to CLAUDE.md so next session loads it.
Show/regenerate the architecture diagram. Returns a Mermaid diagram of the current session's architecture understanding.
Initialize a new CogSession for the current project. Call this at the START of a Claude Code session. Provide parent_session_id to continue from a previous session (tree structure). Provide focus to describe what this session is about.
Load the handoff from a previous session. Call at the START of a new session to get context from the last one. Returns the handoff brief (~250 tokens) — exactly what the new session needs.
Search across ALL sessions for a query. Useful for: 'when did we decide X', 'what dead ends did we hit', 'show me all assumptions about Y'.
Output schemas not documented. Tools return complex objects (session trees, search results, diagrams) but callers cannot predict field names, types, or structure. LLMs cannot plan downstream operations without knowing response format.
Parameter descriptions lack format/constraint guidance. session_update's 'context_pct' has no range (0-100?). session_search's 'limit' defaults to 10 but no min/max stated. session_load's 'load_level' enum is clear, but others lack this precision.
No error handling guidance in tool definitions. Tools that write to disk (session_checkpoint, session_update) or read from disk (session_load, session_tree) can fail (permission denied, disk full, corrupted JSON), but no recovery paths documented.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
What's the current session state? Returns: active session ID, context%, token count, files touched, decisions made, dead ends hit, assumptions, tasks, errors.
Show the full session tree for this project. Like 'git log --graph' but for CogSession work history. Shows all sessions, their relationships, and their status.
Add information to the current session. Use this throughout the session to record: decisions made, dead ends found, assumptions made, tasks completed/added, danger zones discovered, errors seen.
Path traversal and permission validation not visible in tool specs. Tools accept 'project_root' as a string parameter with no validation guidance. LLMs could pass '../../../etc/passwd' or paths outside the intended workspace.
Pagination not documented for list-like tools. session_search returns 'limit' results but no 'offset', 'cursor', or 'total_count' mentioned. session_tree and session_status may return large result sets with no pagination strategy.