Problem
In agentic_common.py, get_available_agents() requires environment variables to be set for Gemini and Codex, even if the user has already authenticated those CLIs interactively.
- Codex: requires
OPENAI_API_KEY or PDD_CODEX_AUTH_AVAILABLE to be set. A user who ran codex login (interactive OAuth) won't have OPENAI_API_KEY in their environment, and PDD_CODEX_AUTH_AVAILABLE is an undocumented escape hatch they wouldn't know about.
- Gemini: requires
GOOGLE_API_KEY, GEMINI_API_KEY, or Vertex AI env vars. A user who authenticated via gemini CLI's interactive OAuth or gcloud auth won't have any of these set.
- Claude: correctly only checks for the CLI binary — no env var gate. This is the right approach since Claude Code handles auth internally.
The result is that pdd change, pdd bug, and pdd fix silently skip Gemini/Codex even when those CLIs are fully authenticated and work fine on their own. The user gets no warning about why they were skipped — they just don't appear as available agents.
Suggested fix
Instead of gating on env vars, try actually invoking the CLI with a lightweight auth check. For example:
- Run something like
codex --version or gemini --help (or whatever minimal command confirms the CLI is authenticated, not just installed).
- If the CLI exits successfully, treat it as available regardless of whether env vars are set.
- Fall back to the current env var checks only if the CLI probe fails or times out.
This mirrors the Claude approach — trust that the CLI manages its own auth — and avoids silently excluding agents that would actually work.
If a runtime probe is too slow, an alternative is to check for the CLI's local credential/token files (e.g. ~/.codex/auth.json or wherever Gemini stores OAuth tokens) as an additional signal alongside env vars.
Problem
In
agentic_common.py,get_available_agents()requires environment variables to be set for Gemini and Codex, even if the user has already authenticated those CLIs interactively.OPENAI_API_KEYorPDD_CODEX_AUTH_AVAILABLEto be set. A user who rancodex login(interactive OAuth) won't haveOPENAI_API_KEYin their environment, andPDD_CODEX_AUTH_AVAILABLEis an undocumented escape hatch they wouldn't know about.GOOGLE_API_KEY,GEMINI_API_KEY, or Vertex AI env vars. A user who authenticated viageminiCLI's interactive OAuth orgcloud authwon't have any of these set.The result is that
pdd change,pdd bug, andpdd fixsilently skip Gemini/Codex even when those CLIs are fully authenticated and work fine on their own. The user gets no warning about why they were skipped — they just don't appear as available agents.Suggested fix
Instead of gating on env vars, try actually invoking the CLI with a lightweight auth check. For example:
codex --versionorgemini --help(or whatever minimal command confirms the CLI is authenticated, not just installed).This mirrors the Claude approach — trust that the CLI manages its own auth — and avoids silently excluding agents that would actually work.
If a runtime probe is too slow, an alternative is to check for the CLI's local credential/token files (e.g.
~/.codex/auth.jsonor wherever Gemini stores OAuth tokens) as an additional signal alongside env vars.