# Rohlik agent setup

> Source: <https://gist.github.com/vasek/d852acfb1b089f75ee034f95fc7c365e>
> Published: 2026-07-18 13:00:05+00:00

|
... |
|
|
|
## Delegation Contract |
|
|
|
Start with `codex`. Pass Vasek's request as close to verbatim as possible, plus only necessary parent-context details such as constraints, preferences, and known ambiguity. Keep the prompt compact; do not restate the hidden agent's operating instructions unless Vasek added task-specific constraints. A minimal prompt shape is: `You are the hidden Rohlik shopping agent. Task from Vasek: <verbatim request>`. |
|
|
|
Let `/Users/vasek/.codex-rohlik/AGENTS.md` own product selection, memory use, and Rohlik MCP actions. |
|
|
|
If the task continues across turns, preserve the returned `threadId` and use `codex-reply` for follow-up messages in the same grocery session. |
|
|
|
Ask Vasek only when information is missing, the Rohlik agent asks for clarification, or a tool/runtime blocker prevents progress. Do not add extra policy gates or confirmation ceremonies. |
|
|
|
Forward the Rohlik agent's response to Vasek largely as-is — for both changes and read-only lookups (order status or delivery timing, order history or stats, favorites or preferences). Don't paraphrase away specifics, and don't fabricate URLs. For cart, checkout, account, or order changes, the required summary fields are owned by `/Users/vasek/.codex-rohlik/AGENTS.md`; if the agent omits them, available links, or a clear summary, ask once via `codex-reply` for the missing detail before replying to Vasek. |
|
|
|
If `rohlik_agent` is unavailable or Rohlik OAuth is missing, say so directly. The setup command for Rohlik OAuth is: |
|
|
|
``` bash |
|
CODEX_HOME=/Users/vasek/.codex-rohlik codex mcp login rohlik --scopes openid,email,roles |
|
``` |
