Discover and list recent AI coding sessions across Claude Code, Claude Desktop, and OpenCode on Windows and WSL. PowerShell script extracts project paths, session IDs, and timestamps from session artifacts. Use when: finding recent coding sessions, reviewing AI session history, exporting session logs to CSV, troubleshooting missing sessions, or auditing Claude Code/OpenCode usage across environments.
From evolv3ainpx claudepluginhub evolv3ai/claude-skills-archive --plugin projectThis skill uses the workspace's default tool permissions.
README.mdassets/example-template.txtreferences/example-reference.mdscripts/example-script.shGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Status: Production Ready
Last Updated: 2026-01-27
Dependencies: PowerShell 7+ (pwsh), WSL2 (for WSL session discovery)
Script Location: D:\admin\scripts\session-scout.ps1
# Show recent sessions (default: top 12)
pwsh -ExecutionPolicy Bypass -File D:\admin\scripts\session-scout.ps1
# Show more sessions
pwsh -ExecutionPolicy Bypass -File D:\admin\scripts\session-scout.ps1 -Top 20
Output columns:
# Export to default location (~/.admin/logs/session-scout-YYYY-MM-DD.csv)
pwsh -ExecutionPolicy Bypass -File D:\admin\scripts\session-scout.ps1 -Csv
# Export to custom path
pwsh -ExecutionPolicy Bypass -File D:\admin\scripts\session-scout.ps1 -File "D:\exports\sessions.csv"
%USERPROFILE%\.claude\projects\*\*.jsonl~/.claude/projects/*/*.jsonl (per distro)%APPDATA%\Claude and %LOCALAPPDATA%\Claude%USERPROFILE%\.local\share\opencode\log\*.log~/.local/share/opencode/log/*.log (per distro)pwsh (PowerShell 7+), not Windows PowerShell 5.1-ExecutionPolicy Bypass when running directly.jsonl files directlyThis skill prevents 3 documented issues:
Error: No sessions found despite active Claude Code usage
Why It Happens: Claude Code changed from chat_*.jsonl to UUID-based filenames
Prevention: Script uses *.jsonl pattern (excluding agent-*.jsonl)
Error: WSL sessions not detected, distro names show as U b u n t u
Why It Happens: wsl.exe -l -q outputs UTF-16LE with null bytes
Prevention: Get-WSLDistros function strips null bytes properly
Error: All OpenCode sessions showing as same type Why It Happens: Desktop opens multiple projects, CLI opens one Prevention: Script detects pattern - multiple dirs = Desktop, single = CLI
| Parameter | Type | Default | Description |
|---|---|---|---|
-Top | int | 12 | Maximum sessions to display |
-Csv | switch | - | Export to default path: ~/.admin/logs/session-scout-YYYY-MM-DD.csv |
-File | string | - | Export to specified CSV path |
Claude Code (Windows):
%USERPROFILE%\.claude\projects\{project-slug}\{uuid}.jsonl
Claude Code (WSL):
~/.claude/projects/{project-slug}/{uuid}.jsonl
Claude Desktop:
%APPDATA%\Claude\
%LOCALAPPDATA%\Claude\
OpenCode (Windows):
%USERPROFILE%\.local\share\opencode\log\{timestamp}.log
OpenCode (WSL):
~/.local/share/opencode/log/{timestamp}.log
Solution: Check expected locations manually:
# Windows Claude Code
dir $env:USERPROFILE\.claude\projects -Recurse -Filter *.jsonl | measure
# WSL Claude Code
wsl -e bash -c 'find ~/.claude/projects -name "*.jsonl" 2>/dev/null | wc -l'
Solution: Ensure WSL is running and distros are accessible:
wsl -l -q
Solution: Path extraction is best-effort. The session file may not contain a cwd field in the first 100 lines.
Tool When ProjectPath Project SessionId
---- ---- ----------- ------- ---------
Claude Code (Windows) 1/26/2026 5:39:03 PM D:\admin D--admin bdeb38c1-98a8-...
Claude Code (WSL:Ubuntu-24.04) 1/26/2026 1:47:28 PM /home/wsladmin/dev/vibe-skills -home-wsladmin-dev-v 3cd316dc-c168-...
OpenCode CLI 1/26/2026 5:30:37 PM D:\rlm-project 2026-01-26T203036
OpenCode Desktop 1/26/2026 1:53:00 PM D:\wireframe-kit 2026-01-26T190547
Claude Desktop 1/26/2026 10:10:18 AM sentry session
This script is part of the Windows admin toolkit (D:\admin). Session data can be used for:
pwsh --version)D:\admin\scripts\session-scout.ps1Questions? Issues?
-Top 5 to test basic functionalitywsl -l -q