Bring Your Own Agent (BYOA)
Route Critique review findings to Cursor Cloud Agents, Claude Managed Agents, OpenAI Codex, or paste-based agents — without double-paying for execution.
Critique answers what should change on a pull request. BYOA (Bring Your Own Agent) is how you answer who writes the patch using tools you already pay for — while Critique stays the review and decision layer.
This is separate from BYOK (Bring Your Own Key), where you supply an OpenRouter key so Critique’s review and chat models bill OpenRouter directly. BYOA and BYOK work together: BYOK for inference on review, BYOA for fix execution on your agent stack.
Choose your execution path
| Path | What runs the fix | Critique credits for execution | Setup |
|---|---|---|---|
| Remedy | Critique-managed sandbox | Yes (Remedy workload) | One click on review run |
| Cursor Cloud Agent | Your Cursor account | No — Cursor bills you | Cursor API key in Settings |
| Claude Managed Agents | Your Anthropic account | No — Anthropic bills you | Anthropic API key in Settings |
| OpenAI Codex | Your OpenAI account (Responses API) | No — OpenAI bills you | OpenAI API key in Settings |
| Fix prompt | You paste into Codex, Claude Code, or Copilot | Small Critique usage to generate prompt | Review run → Fix prompt |
| Claude Code from chat | Anthropic via chat handoff tool | Uses browser-local key | Settings → Claude Code handoff |
flowchart TB
RV[Critique review findings]
RV --> R[Remedy managed]
RV --> C[Cursor Cloud Agent]
RV --> CL[Claude Managed Agent]
RV --> CX[OpenAI Responses / Codex]
RV --> F[Fix prompt copy]
F --> Codex[OpenAI Codex]
F --> CC[Claude Code]
F --> Cop[GitHub Copilot]
RV --> Chat[Chat handoff]
Chat --> CCThe fix blueprint
Every BYOA path starts from the same fix blueprint Critique builds from the review:
- What failed or warned, with file locations
- Allowed write scope (same bounded idea as Remedy)
- Suggested validation (tests, lint, build when detectable)
- Review strictness and summary context
Remedy consumes the blueprint inside Critique. Queued BYOA paths serialize it into provider-specific handoffs (critique.cursor_agent_handoff, critique.claude_agent_handoff, critique.codex_agent_handoff). Fix prompt produces a paste-ready variant for any other agent.
Cursor Cloud Agents
Status: Live — queue from the dashboard or export JSON.
Setup
- In Cursor, create an API key under Dashboard → Integrations.
- In Critique Settings → Cursor Cloud Agents (BYOA), save the key (encrypted server-side).
- Open a completed review run on the PR you want to fix.
Run a fix
- On the review run page, optionally add operator instructions.
- Click Queue Cursor agent.
- Use Open in Cursor when the Cloud Agent URL is available.
Critique passes the PR URL and works on the current branch (workOnCurrentBranch). Execution bills to your Cursor plan, not Critique credits.
Export
GET /api/review-runs/{reviewRunId}/byoa/cursor — add ?download=1 for an attachment.
Claude Managed Agents
Status: Live — queue from the dashboard or export JSON.
Setup
- Create an Anthropic API key with access to Claude Managed Agents (beta header
managed-agents-2026-04-01). - In Critique Settings → Claude Managed Agents (BYOA), save the key (encrypted server-side).
- Open a completed review run.
Run a fix
- Add optional operator instructions on the review run page.
- Click Queue Claude agent.
- Critique provisions (once per account) a Managed Agent with
agent_toolset_20260401and a cloud environment, starts a session with your repo mounted via the GitHub App installation token, sends the handoff as auser.messageevent, and polls until the session isidleorterminated. - Use Open session when a console URL is recorded.
Execution bills to your Anthropic account. Critique does not charge execution credits for the agent loop.
Export
GET /api/review-runs/{reviewRunId}/byoa/claude — add ?download=1 for an attachment.
Environment variables (server)
| Variable | Purpose |
|---|---|
CRITIQUE_SECRETS_ENCRYPTION_KEY | Required to store Anthropic (and other BYOA) keys |
CRITIQUE_CLAUDE_AGENT_MODEL_ID | Optional Managed Agent model id (default claude-sonnet-4-6) |
Three Claude paths
Managed Agents (review run) = server key, PR checkout, queued worker. Fix prompt = paste on a review run. Chat handoff = browser-local key for thread export — see Chat tools.
OpenAI Codex
Status: Live — queue Responses API runs and export JSON for Codex cloud / CLI.
OpenAI’s Codex cloud task surface does not yet mirror Cursor’s single REST “agent on PR” contract in Critique. The queue path calls the documented Responses API with your platform key so work is a real API invocation. Use export when you want the full Codex sandbox or CLI workflow.
Setup
- Create an OpenAI API key.
- In Critique Settings → OpenAI Codex (BYOA), save the key (encrypted server-side).
- Open a completed review run.
Run a fix
- Add optional operator instructions.
- Click Queue Codex run.
- A QStash worker calls
POST /v1/responseswith the handoff prompt (default modelcodex-mini-latest). - Open the logged response link when present.
Token usage bills to your OpenAI account.
Export
GET /api/review-runs/{reviewRunId}/byoa/codex — add ?download=1 for an attachment.
Environment variables (server)
| Variable | Purpose |
|---|---|
CRITIQUE_SECRETS_ENCRYPTION_KEY | Required to store OpenAI keys |
CRITIQUE_CODEX_AGENT_MODEL_ID | Optional Responses model (default codex-mini-latest) |
Fix prompt: Codex, Claude Code, Copilot
Status: Live — manual paste when you do not need queueing.
- Open Dashboard → Review runs → select a completed run.
- Click Generate fix prompt.
- Paste into Codex, Claude Code, Copilot, or any agent that accepts rich instructions.
Generating the fix prompt uses a modest Critique model call; execution stays in the product you already own.
Claude Code from chat
Status: Live for chat handoff — separate from review-run queueing.
- Settings → Claude Code handoff (browser-local Anthropic key).
- In chat, use prepare Claude Code handoff or ask to hand off (see Chat tools).
OpenRouter BYOK (not BYOA)
Connecting an OpenRouter key is BYOK, not BYOA. Pair BYOK with any execution row in the table above.
BYOA vs Remedy
| Remedy | BYOA | |
|---|---|---|
| Executor | Critique E2B / OpenCode pipeline | Your Cursor, Anthropic, OpenAI, or paste-based agent |
| Billing | Critique credits | Your agent subscription (+ OpenRouter if BYOK for review) |
| Best for | “Fix this PR inside Critique” | “We already pay for Cursor / Anthropic / OpenAI” |
Many teams use Critique for review, BYOA for execution, and BYOK when OpenRouter should carry model cost.