The Conversation Monitor provides a lightweight, mobile-friendly interface for browsing, searching, and analyzing Claude Code conversations. Perfect for reviewing sessions on tablets or phones.Documentation Index
Fetch the complete documentation index at: https://docs.aitmpl.com/llms.txt
Use this file to discover all available pages before exploring further.
Launch Monitor
Start the conversation monitor:http://localhost:9876.
Options
Verbose Mode
Enable detailed logging:- File watching events
- Message change detection
- WebSocket broadcasts
- State calculations
Remote Access
Setup Cloudflare Tunnel for remote access:Disable Auto-open
Start server without opening browser:Features
Conversation Browsing
- List view: All conversations sorted by last modified
- Project grouping: Filter by working directory
- State indicators: Active, Idle, Recently active, Inactive
- Message counts: Total messages per conversation
- Token usage: Token counts displayed
Search Capabilities
Metadata Search
Search by:- Conversation ID
- Filename
- Project name
Content Search
Search within message content:- Text messages
- Tool use blocks
- Tool names
- Tool inputs
Date Range Filtering
Working Directory Filter
Conversation Details
View full conversation messages:- Message role (user/assistant)
- Message content (text and tool blocks)
- Correlated tool results
- Timestamps
- Model information
- Token usage per message
In-Conversation Search
Search within a specific conversation:- Message index
- Role and timestamp
- Preview with context
- Match count per message
Session Export
Download conversation as markdown:Conversation Analytics
Get detailed analytics for a conversation:- Message count and token usage
- Cost estimate (input/output/cache)
- Model usage breakdown
- Tool usage statistics
- Session timeline and duration
- Time breakdown (user vs. Claude)
- Components used (agents, commands, skills)
- Optimization tips
API Reference
GET /api/conversations
List all conversations:GET /api/conversation-state
Get states for all conversations:lines/chats-mobile.js:146GET /api/directories
Get unique working directories:lines/chats-mobile.js:182POST /api/search
Advanced search:lines/chats-mobile.js:210 Request:POST /api/conversations/:id/search
Search within conversation:lines/chats-mobile.js:312 Request:Real-time Updates
WebSocket connection for live updates:lines/chats-mobile.js:976new_message: New message added to conversationdata_refresh: Conversations reloadedstate_change: Conversation state changed
Change Detection
The monitor tracks:lines/chats-mobile.js:864- Message count changes: New messages added
- Message updates: Tool results correlated
- Snapshots: Detects structural changes
- Message ID
- Role
- Content length
- Tool result count
- Tool use presence
Architecture
Core Classes
ChatsMobile:line/chats-mobile.js:16- Main server class
- Express app on port 9876
- WebSocket server integration
- File watching and change detection
- Loads conversation JSONL files
- Parses messages with tool correlation
- Caches parsed conversations
- Determines conversation states
- Uses message timestamps and activity
- Exports conversations as markdown
- Handles message formatting
- Includes tool results
Message Tracking
Message counts tracked per conversation:lines/chats-mobile.js:44- Compare previous count vs. current
- Generate snapshots for all messages
- Detect new messages (count increased)
- Detect updated messages (snapshot changed)
- Broadcast via WebSocket
Example: Export Conversation
Example: Search Across Projects
Troubleshooting
Port Already in Use
Chats Mobile uses port 9876. If occupied:line/chats-mobile.js:19No Conversations Found
Check Claude directory exists:Search Returns No Results
- Content search looks in message content AND tool results:line/chats-mobile.js:358
- Try searching for tool names or commands
- Check date range covers conversation dates
WebSocket Not Connecting
Verify WebSocket server initialized:lines/chats-mobile.js:1054Cloudflare Tunnel Timeout
If tunnel URL not detected after 45 seconds:lines/chats-mobile.js:1154Performance Tips
- Pagination: Use
?page=0&limit=50for large conversations:line/chats-mobile.js:434 - Specific searches: Combine filters to narrow results
- State polling: Use
/api/conversation-statefor lightweight checks - Export limits: Exports limited to prevent timeout
See Also
- Analytics Dashboard - Comprehensive analytics
- Stats Tools - Command and hook analyzers
- Health Check - System validation