Session Environment
Environment Configuration
- Location: /opt/mcp-servers/session/mcp_session_server.py
- Vault Port: 6645 (requires password)
- Operational Port: 6646
- Locker ID: l_036d
- Vault Password: via credentials_helper (l_3b79)
Purpose
Session management with AI state persistence, hierarchical objectives, work block tracking, item linking, and session chaining for migration.
| Tool |
Description |
start |
Start new session |
continue_session |
Continue existing session |
current |
Get current session info |
end |
End current session |
list |
List all sessions |
sync |
Sync session state |
title |
Set session title |
summary |
Get/set session summary |
subsession_start |
Start subsession |
subsession_end |
End subsession |
item |
Link item to session |
dashboard |
Session dashboard view |
| Tool |
Description |
agenda |
Get session agenda |
agenda_update |
Update agenda |
agenda_clear |
Clear agenda |
| Tool |
Description |
ai_state_save |
Save AI state (todos, notes, context) |
ai_state_get |
Get saved AI state |
ai_state_transfer |
Transfer state between terminals |
ai_state_list |
List saved states |
| Tool |
Description |
objectives_add |
Add session objective |
objectives_add_batch |
Add multiple objectives |
objectives_list |
List objectives |
objectives_update |
Update objective status |
objectives_get |
Get specific objective |
objectives_delete |
Delete objective |
objectives_move |
Reorder objectives |
| Tool |
Description |
migrate |
Migrate items between sessions |
integrity |
Check session integrity |
Key Features
Stable IDs
- Format: s_XXXX derived from session suffix
- Example: s_kxkc from 20260106_0959_kxkc
AI State Persistence
- Save/restore todos, notes, context across terminals
- Enables multi-terminal coordination
Session Objectives
- Hierarchical goal tracking
- Displayed in workflow.init
- Status: pending, in_progress, completed
Session Chaining
- Items accumulate session_ids array on migration
- Preserves history across sessions
Bug Fixes Applied
✅ AI State Key Pattern Mismatch (Fixed 2026-01-06 by Indiana)
- Problem: ai_state_get only checked new key pattern sess:{stable_id}:ai_state:{ai_id}
- Impact: Data saved with legacy pattern sess:{user}:{session_id}:ai_state:{ai_id} was invisible
- Fix: Explicit dual key pattern checking - try new pattern first, fall back to legacy
- Result: AI states now recoverable during session continuations
- File modified: /opt/mcp-servers/session/mcp_session_server.py
Status: ✅ WORKING
Port 6645 operational. AI state retrieval bug fixed - now checks both key patterns.
Audited by Indiana (a_jh9b) | Documented by Rocky (o_cq0c) | 2026-01-06