Home/Tutorials/PorkiConsult

Tutorial 03 ยท PorkiConsult

Give your agent another brain.

Let Claude Code, Codex, or Grok Build ask either of the other two local subscription CLIs for a focused second opinion. The answer comes back to the master session with only the bounded context you approved.

About 6 minutesExplicit approvalRead-only worker

Start with the CLIs you already use

PorkiCoder auto-registers its bundled porkicoder-consult MCP server with Claude Code, Codex, and Grok Build. Each subscription-backed tool launches the corresponding local CLI and uses its existing login.

  • consult_claude_code uses your Claude Code subscription.
  • consult_codex uses your ChatGPT or Codex subscription.
  • consult_grok_build uses your Grok Build subscription.

After installing or updating PorkiCoder, open a fresh master terminal session so the CLI receives the current MCP registration and tool schema.

Make your first PorkiConsult call

Ask the master agent in plain language. Name the reviewer and describe the decision you want challenged:

Ask Codex to review this retry design. Pass only the proposed algorithm and the failure cases we listed. Focus on correctness and concurrency.

The master prepares a tool call with a question and optional context. PorkiCoder asks for explicit approval. Once approved, the worker runs in a private temporary workspace and returns advisory markdown to the master.

A strong consult request has three parts: the decision, the evidence the reviewer needs, and a narrow review lens such as correctness, security, architecture, or regression risk.

Choose a different model lineage

A second opinion is most useful when the reviewer brings a different model family from the master:

  • Claude Code as master: ask Codex for implementation and review pressure, or Grok Build for an independent architecture challenge.
  • Codex as master: ask Claude Code for a long-form design review, or Grok Build for a third-lineage challenge.
  • Grok Build as master: ask Claude Code for architecture and Codex for focused correctness review.

The master remains responsible for validating the returned advice against the repository and deciding whether to act on it.

Curate a bounded context packet

The subscription worker cannot inspect the repository. Give it the smallest packet that supports a useful answer:

  1. State the exact question or disputed decision.
  2. Include the relevant function, diff, error, or plan excerpt.
  3. List the invariants and constraints that the answer must preserve.
  4. Ask for findings in a format the master can evaluate, such as severity-ranked issues or a short recommendation with tradeoffs.
Question: Can this idempotency design double-charge after a retry?
Context: [paste the bounded handler, transaction boundary, and retry rules]
Return: High, medium, and low severity findings. Cite the supplied lines.

A focused packet reduces noise, limits disclosure, and makes it easier for the master to verify every claim.

Know what the worker can access

The three local subscription tools require explicit approval and run read-only in a private temporary workspace. They receive only the question and context supplied to the call.

  • No repository access.
  • No file editing or shell commands.
  • No web, MCP, plugin, or persistent-session access inside the worker.
  • No paid-API fallback for these subscription-backed tools.

They consume the selected provider subscription quota. PorkiCoder also offers separately named API consult tools, and those require their own explicit approval and billing path.

If the consult tool is missing

  1. Start a fresh master terminal after updating PorkiCoder.
  2. Confirm the target CLI is installed and signed in: claude auth status --json, codex login status, or grok --no-auto-update models.
  3. Ask the master to list its MCP tools and confirm porkicoder-consult is connected.
  4. If a user configuration disabled the server, re-enable the porkicoder-consult entry and restart that CLI session.