henry-md/codex-skills/check-codex-tabs
Claude Code and agent skill by henry-md/codex-skills
- community
Checking that the SKILL.md file is still in the repository.
Inspect local state on this Mac to identify which Codex tabs or Claude Code sessions are open, still active, finished but left open, or interrupted. Use when the user asks which Codex tabs are in-flight, which Claude Code sessions are active, which open chats are done editing, or to audit recent local AI coding activity for the current repo or across all workspaces.
Install
npx vskill@latest install henry-md/codex-skills/check-codex-tabsSKILL.md
The same SKILL.md was published earlier as henry-md/codex-skills/check-codex-tabs.
Check Codex / Claude Code Tabs
Use this skill to answer tab-status questions from local filesystem data instead of guessing from the visible app UI. Covers both Codex Desktop and Claude Code (Cursor sidebar or desktop app).
Codex Source Of Truth
~/.codex/state_5.sqlite—threadstable.archived = 0= tab is open (exists in UI);archived = 1= tab was explicitly deleted and will never appear again. All unarchived threads are considered open.rollout_pathfrom eachthreadsrow — JSONL transcript under~/.codex/sessions/...; inspect the last JSON object to classify activity.~/.codex/session_index.jsonl— fallback if the state database is unavailable.~/Library/Application Support/Codex— ignore unless~/.codexis missing.
Do not start with logs_*.sqlite.
Claude Code Source Of Truth
Claude Code has no archived/unarchived distinction. A conversation either exists (JSONL file is present) or was deleted (file is gone — you'll never see it). All files you find are open sessions.
~/.claude/projects/<slug>/*.jsonl— one file per conversation. Presence = open/exists. Inspect the last JSON line to classify activity.~/.claude/sessions/*.json— currently running Claude Code processes (pid,sessionId,cwd,kind,entrypoint). Cross-reference these to identify which conversations are actively executing right now.~/.claude/ide/*.lock— one per active Cursor/IDE window (pid,workspaceFolders,ideName). Lock file present = a Cursor window is live.
To map a project slug back to a repo path: the slug is the absolute path with / replaced by - (e.g. /Users/Henry/Developer/job-helper → -Users-Henry-Developer-job-helper).
Fast Workflow
- Determine the scope and runtime first.
- If the user asks about the current repo, run
git rev-parse --show-toplevel. - If the user asks about Codex specifically, use the Codex path. If Claude Code specifically, use the Claude Code path. If unspecified, check both.
- Codex — prefer the helper script:
``bash python3 /Users/Henry/.codex/skills/check-codex-tabs/scripts/check_codex_tabs.py ` Add --cwd /absolute/repo/root for repo-specific output, --active-only for in-flight only, --limit N` for slice size. Fall back to a direct SQLite query if the script is unavailable.
- Claude Code — list sessions for the repo and inspect last events:
```bash # list sessions for a repo (replace slug as needed) ls -lt ~/.claude/projects/-Users-Henry-Developer-job-helper/*.jsonl | head -20
# get last event from a session tail -n 1 ~/.claude/projects/-Users-Henry-Developer-job-helper/<session-id>.jsonl
# see which sessions are actively running right now ls ~/.claude/sessions/ cat ~/.claude/sessions/<pid>.json ```
Manual Codex Query
Status Rules
Use the last event in the transcript to classify activity:
Codex (rollout JSONL):
event_msg+task_complete:done-openevent_msg+turn_aborted:interrupted- anything else as last event:
active - missing/unreadable file:
unknown - Common active signals: last events such as
exec_command_end,function_call_output,patch_apply_end, ortoken_count. - Do not equate
archived = 0with active work; many tabs stay open after finishing cleanly.
Claude Code (session JSONL — last line is a JSON message object):
role: assistantwith a final text message (no tool calls in progress):done-open- Session pid present in
~/.claude/sessions/and last event is a tool call or partial turn:active - Session pid absent from
~/.claude/sessions/and last event is mid-turn:interrupted - Unreadable file:
unknown
Output
- Group into
Active,Done But Open, andInterrupted Or Unknown. - Include each session's title or session ID,
cwd, updated time, and last event used to classify it. - If the user only asked which sessions are in-flight, report only
Active. - If there are no active sessions in scope, say so explicitly.
- Label each result with its runtime:
[Codex]or[Claude Code].
Constraints
- For Codex: treat
archived = 0as open. For Claude Code: treat every existing JSONL as open. - Do not claim to know which tab is frontmost or visually selected.
- Prefer exact
cwdmatching for repo-specific requests. - Prefer the helper script over fragile shell pipelines that parse SQLite output with tabs or newlines in titles.
- If
state_5.sqliteis missing, search for the neweststate_*.sqliteunder~/.codexbefore falling back tosession_index.jsonl.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcheck-codex-tabs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/henry-md/codex-skills/check-codex-tabs)