Skip to content

/ask-gpt

Get GPT (Codex) second opinion on a question or current work. Single-shot, advisory, no contamination.

From plugin
deliberation
18015 skills15 commands1 MCP
> /plugin marketplace add antonbabenko/deliberation
> /plugin install deliberation@antonbabenko-deliberation

Command definition

ask-gpt.md
name: ask-gpt
description: Get GPT (Codex) second opinion on a question or current work. Single-shot, advisory, no contamination.
allowed-tools: mcp__deliberation__panel, mcp__deliberation__codex-login, AskUserQuestion, mcp__deliberation__ask-gpt, Read, Bash
timeout: 660000

Ask GPT

Single-shot delegation to GPT for an independent second opinion, through the unified `deliberation` MCP server (it spawns `codex exec` itself - codex-cli ships no MCP server of its own). Fresh call, no shared context with prior calls. Advisory: the run is pinned to Codex's read-only sandbox.

Input

User question or topic: $ARGUMENTS

Workflow

1. **Identify expert** - match `$ARGUMENTS` against trigger patterns in `~/.claude/rules/deliberation/triggers.md`:

  • Architecture / design / tradeoffs → Architect
  • Plan validation → Plan Reviewer
  • Requirements / scope → Scope Analyst
  • Code review / find bugs → Code Reviewer
  • Security / vulnerabilities → Security Analyst
  • Default if unclear → Architect

2. **Read expert prompt** via this resolution sequence: 1. Glob `~/.claude/plugins/cache/*/deliberation/*/prompts/[expert].md`. Pick the match with the highest semver version segment (the segment immediately after `deliberation/`, parsed as semver - not lexical string compare). 2. If no match, look up the inlined fallback under the heading `## Inlined fallback - [Expert]` in this command file (see end of this file). 3. If neither found, abort with: `Error: deliberation plugin cache missing for expert "[Expert]". Run /plugin install deliberation or /reload-plugins.`

3. **Build 7-section delegation prompt** per `~/.claude/rules/deliberation/delegation-format.md`. Include:

  • Verbatim user question from `$ARGUMENTS`
  • Relevant code snippets / file paths from current conversation context
  • Any specific constraints user has mentioned this session
  • Time-sensitive facts: when the question turns on latest or current versions, pricing, a roadmap, or whether a model or tool exists, verify it with your own tools first and add the facts with as-of date and source (the delegate gets today's date from the server but cannot look anything up)

4. **Log GPT in first.** Call `mcp__deliberation__panel({ cwd: "[cwd]" })` and read only its `needsLogin`. If it contains `codex`, GPT has no ChatGPT login on this machine yet: 1. Call `mcp__deliberation__codex-login({})` and print its `message` as-is EVERY time you call it (the link and the code each stay on their own line). Then act on `status`:

  • `authenticated`: keep codex and go on.
  • `starting` (no code yet; each call already waits up to ~20s for one): call again.

Three `starting` results in a row count as `failed`.

  • `pending`: go to step 2.
  • `failed`, `unavailable`, a call that errors, or anything else: stop and show the user why GPT cannot answer (no call is made), and name it once with that message.

2. Ask the user with `AskUserQuestion` ("Approve the GPT login in the browser with the code above, then pick one"), options `Done - include GPT` and `Skip GPT this run`. A host without `AskUserQuestion` asks the same in one plain line and ends the turn; treat the user's reply as that choice. 3. `Skip`: stop and show the user why GPT cannot answer (no call is made). `Done`: call `codex-login` again, print its `message`, and act on `status` as in step 1, except `pending`: ask step 2 once more; if after that second `Done` it is still `pending`, stop and show the user why GPT cannot answer (no call is made) and say GPT answers from the next run once the login lands. Caps for the whole gate: at most 3 `starting` results in a row and at most 2 questions; past either, stop and show the user why GPT cannot answer (no call is made). `panel` only reads a flag; the login starts here, after the user asked for GPT, so the 15-minute code is spent on this run. Never drop codex silently because it looks logged out.

5. **Call GPT** - single-shot, advisory:

   mcp__deliberation__ask-gpt({
     prompt: "[7-section delegation prompt]",
     developerInstructions: "[contents of expert prompt file]",
     cwd: "[current working directory]"
   })

6. **Never pre-empt the call.** Do not skip step 5 because GPT looks logged out (no `auth.json`, `codex doctor` says so, a session-start hook said so): step 4 is the only credential check, and the call itself starts the device login when needed. Do not read credential files yourself. (`/deliberation:codex-login` does only the login, when the user wants it without a question.)

7. **Login link (fallback).** If the result is `errorKind: "auth"` and its `message` carries a link and a one-time code, GPT has no ChatGPT login on this machine yet and deliberation has started `codex login --device-auth`. Show that message to the user as-is (it is the user's action, not an expert answer), say GPT answers after they approve, and stop. Re-run the command once they confirm. A host that supports MCP elicitation shows the same link and code in a dialog during the call instead.

8. **Synthesize response** - never paste raw output. Extract:

  • Bottom-line recommendation
  • Key reasoning points
  • Where GPT diverges from your prior analysis (if applicable)
  • Your assessment of whether GPT is correct

Rules

  • **Single-shot only** - the tool carries no `threadId` and GPT has no multi-turn path here. Each invocation is independent; a retry re-sends the full history in the prompt.
  • **Advisory always** - the provider pins `codex exec --sandbox read-only`. GPT cannot edit files through this command; for an implementation delegation use `/ask-gemini` with `sandbox: "workspace-write"`.
  • **No contamination** - do not include prior Gemini opinions in the GPT prompt. Each expert reasons independently.
  • **Print status line** immediately before the MCP dispatch: `Codex working (typical 30
Read more
@antonbabenko
Ships withdeliberation

Get a second opinion from GPT, Gemini, and Grok in Claude Code, Codex, Cursor, Kiro, Antigravity, OpenCode, or any other MCP host - plus local models (Ollama, LM Studio) and 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek.

Stars on GitHub

Momentum

stars in total
180
Star history of antonbabenko/deliberation on GitHub, a chart by star-history.com

Other commands on deliberation.

analyze
Auto-invoked

analyze

Command

Analyze recent runs - per-model latency, tokens, and verdict agreement - and suggest model/reasoning/fanout tuning. Advisory,…

ask-all
Auto-invoked

ask-all

Command

Ask GPT, Gemini, Grok, and any configured OpenRouter models in parallel for independent second opinions, then synthesize and…

ask-gemini
Auto-invoked

ask-gemini

Command

Get Gemini second opinion on a question or current work. Single-shot, advisory, no contamination. Model pinned per call.

ask-grok
Auto-invoked

ask-grok

Command

Get Grok (xAI) second opinion on a question or current work. Single-shot, advisory, no contamination.

codex-login
Auto-invoked

codex-login

Command

Log GPT (Codex) in on this machine with a ChatGPT device login - shows a link and a one-time code. For remote or headless…

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command