debug-session-visibilitylisted
Install: claude install-skill open-ace/open-ace
# Debug Session Visibility
When a user reports sessions missing from the left-panel session list in Work Mode,
follow this pipeline-checking approach to isolate the root cause.
## Data Pipeline Overview
There are **two independent import paths** for sessions. Check both:
### Path A: Local fetch scripts (DataFetchScheduler)
```
Source JSONL files → fetch_<tool>.py import → agent_sessions DB table → API → Frontend
```
### Path B: Remote terminal session_sync
```
Remote agent session_sync.py → WebSocket → remote.py handler → agent_sessions DB table → API → Frontend
```
A session can be missing at any stage. Check each stage in order.
## Step 1: Check if source files exist
Verify the raw session data exists on disk for the expected date:
```bash
# Codex
ls -la ~/.codex/sessions/YYYY/MM/DD/
# Claude
ls -la ~/.claude/projects/*/sessions/
# Qwen
ls -la ~/.qwen/sessions/
```
If no files exist for today → the tool hasn't created sessions yet (user-side issue).
## Step 2: Check if sessions are in the database
Query `agent_sessions` directly to see if the sessions were imported:
```python
from scripts.shared.db import get_connection
conn = get_connection()
cursor = conn.cursor()
# Check by tool_name and recent date
cursor.execute("SELECT session_id, title, tool_name, user_id, created_at, updated_at FROM agent_sessions WHERE tool_name = 'codex' ORDER BY updated_at DESC LIMIT 10")
for r in cursor.fetchall(): print(dict(r))
conn.close()
```
If the session ID from the file i