Skip to content

feat(session-start): report real Codex availability in status line - #52

Open
sepehrn0107 wants to merge 1 commit into
masterfrom
feat/dynamic-codex-status
Open

feat(session-start): report real Codex availability in status line#52
sepehrn0107 wants to merge 1 commit into
masterfrom
feat/dynamic-codex-status

Conversation

@sepehrn0107

Copy link
Copy Markdown
Owner

What

  • Added a dynamic Codex availability check to the session-start hook
  • The hook now discovers the Codex companion script via a glob over ~/.claude/plugins/ paths and runs it with --json at startup
  • Status line now shows Codex: available or Codex: unavailable instead of hardcoded Skills: ready
  • Updated session-start.md template to include the actual CODEX_AVAILABLE result in the status line format

Why

The previous Skills: ready label was hardcoded — it gave no real signal about whether Codex was installed and authenticated. This makes Codex status visible at session start without requiring the user or Claude to invoke codex:setup manually to find out.

How

The hook loops over ~/.claude/plugins and ~/.claude/plugins/marketplaces/*/ to find codex-companion.mjs, runs it with --json, and greps for "ready": true. This makes the check installation-path-agnostic.

Test plan

  • Open a new Claude Code session in the workspace — status line should show Codex: available
  • Temporarily rename the companion script and reopen — should show Codex: unavailable

Replace hardcoded 'Skills: ready' with a dynamic check against the
Codex companion script at hook startup. The hook now discovers the
companion via a glob over ~/.claude/plugins/ and ~/.claude/plugins/marketplaces/*/,
runs it with --json, and sets CODEX_LABEL to 'available' or 'unavailable'.

Claude's session-start instructions are updated to include the actual
CODEX_AVAILABLE result in the status line format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant