# Ask another AI for a second opinion

One model proposes, another looks for the hole. ChatGPT asks Claude Code on your computer a
question, reads the answer, and carries on the conversation. No integration between the two
vendors is needed: both use what is already installed and signed in on your computer.

**In short:** Ask ChatGPT: "Ask Claude Code on my laptop: …". It calls [`agent_prompt`](https://docs.cmdop.ai/reference/tools/agent_prompt.md)
`{"agent": "claude-code", "prompt": "…"}` and gets the answer and a `session` to continue. No `exec` needed.

## When to use this

A plan, a piece of code or an argument you want checked by a second model that has not seen the
first one's reasoning.

## Before you start

- [ChatGPT connected](https://docs.cmdop.ai/guides/connect/chatgpt.md) to CMDOP, with the `agent` risk class switched on for it
  ([grant risk classes](https://docs.cmdop.ai/guides/access/grant.md)), and the computer allowing Claude Code in its `ceiling.json`
  ([Ask an AI agent on a machine](https://docs.cmdop.ai/guides/ask-an-agent.md)).
- Claude Code installed and signed in on that computer, under the same user. The model behind it
  runs at Anthropic, not on your computer, and its use counts against your own Claude account.

## Steps

1. Ask ChatGPT to put the question to Claude, for example: "Ask Claude Code on my laptop to find
   the weakest point in this plan: …".
2. ChatGPT calls [`agent_prompt`](https://docs.cmdop.ai/reference/tools/agent_prompt.md) with the question and reads the reply
   from `text`.
3. Ask ChatGPT to answer back or ask a follow-up; it passes the `session` back, so Claude keeps the thread.

The asked agent answers in words or reads files; it never changes files or runs commands. Without the
`agent` class you can still do this with `exec_run` and `claude -p`, but then the program acts on your
computer under its own permission settings.

## Safety

- If the other program refuses, or asks for a confirmation, bring that back to the person. Do not
  rephrase the request, claim the person already allowed it, or repeat it until the program agrees.
- Send no secrets in the prompt: it leaves your computer for the other vendor.
- Each call uses the person's own subscription with the other vendor. A program being installed
  on the computer does not mean the model runs there.

## Check

Your page lists each `agent_prompt` under ChatGPT, with how it ended; the prompt and the answer are not stored
([the record of calls](https://docs.cmdop.ai/concepts/audit-and-history.md)).

## If it fails

- [`denied`](https://docs.cmdop.ai/reference/errors/denied.md): `agent` is off for ChatGPT or on this computer, or Claude Code is not in the
  ceiling's `agents` `allow`.
- [`not_found`](https://docs.cmdop.ai/reference/errors/not_found.md): Claude Code is not installed for that user.
- [`busy`](https://docs.cmdop.ai/reference/errors/busy.md): Claude is still answering the previous question.
- [`tool_refused`](https://docs.cmdop.ai/reference/errors/tool_refused.md): Claude tried to use a tool on a `text_only` run; ask in a way
  it can answer in words.

## Related

[Ask an AI agent on a machine](https://docs.cmdop.ai/guides/ask-an-agent.md) · [Let ChatGPT run commands](https://docs.cmdop.ai/guides/use-cases/chatgpt-runs-commands.md) ·
[Revoke an agent](https://docs.cmdop.ai/guides/access/revoke.md)
