The building blocks of current Sidekick delegation — Kay and Codex sidekick modes, per-session hooks, the shared active-sidekick selector, and host-owned verification. For canonical terms, see Glossary.
When you invoke /sidekick:codex-delegate, the host activates Codex sidekick mode for the current session. The host AI does not write implementation edits directly while the mode is active. It delegates bounded work to the local OpenAI Codex CLI through codex exec, then verifies the result before reporting success.
The Codex sidekick is pinned to gpt-5.4-mini with extra-high reasoning. Sidekick injects the model, reasoning, sandbox, and approval flags through the hook layer so the host can keep prompts focused on the task instead of runtime plumbing.
/sidekick:codex-delegate is active, implementation tasks are routed to Codex until /sidekick:codex-stop removes the current-session marker. Codex and Kay are mutually exclusive in the same host session through the shared active-sidekick selector.Kay is Sidekick's Kay/OpenCode Go execution sidekick. The user-facing activation surface is /sidekick:kay-delegate, with xiaomi and ocg selectors for provider routing. Once Kay mode is active, Sidekick routes implementation through Kay's native kay exec runtime path.
Kay keeps native agents, skills, subagents, and AGENTS.md support. Sidekick contributes package wiring, a session-scoped Kay marker, the shared active-sidekick selector, a .kay/conversations.idx lookup ledger, and progress summaries from the Kay hook surface.
Canonical workflows live under skills/: kay-delegate, kay-stop, codex-delegate, and codex-stop. Generated host bundles under agents/claude/ and agents/codex/ are rendered from those canonical skills.
The canonical skills cover:
The host verifies every sidekick result. It treats sidekick success output as a claim to audit, not proof. Failures are classified with the current taxonomy:
If any failure is found, the host relaunches or guides the active sidekick with focused correction context, then verifies again.
The recovery loop is evidence-based and repeats until no taxonomy failure remains.
STATUS: SUCCESS is not enough by itself.Sidekick's hooks stay dormant until a sidekick is active for the current session. While active, the hook layer denies direct implementation edits and routes supported runtime commands through bounded, redacted progress surfaces.
| Mode | Hook behavior |
|---|---|
| Kay | Routes implementation through kay exec, records .kay/conversations.idx, and surfaces Kay summaries. |
| Codex | Routes implementation through codex exec, injects gpt-5.4-mini and xhigh, records .codex/conversations.idx, and surfaces Codex summaries. |
| Direct host mode | No sidekick marker is active, so normal host behavior resumes. |
The shared selector lives at ~/.sidekick/sessions/<session>/active-sidekick and contains either kay or codex. Only one sidekick should enforce within a host session.
AGENTS.md remains the project instruction surface for hosts and sidekicks. It should describe supported sidekicks, project conventions, tests, integrity workflow, and release discipline.
Canonical workflows live under skills/. Generated host bundles under agents/claude/ and agents/codex/ are rendered by bash scripts/sync-host-surfaces.sh. Keep those surfaces aligned when canonical skills change.
Codex mode uses the local OpenAI Codex CLI with these Sidekick-managed flags:
Sidekick keeps provider ownership with the active runtime. Kay uses its Kay/OpenCode Go path by default and supports xiaomi, ocg, and SIDEKICK_KAY_PROVIDER selectors. Codex sidekick mode uses the local OpenAI Codex CLI and does not use Kay provider aliases.
For Kay, use Kay's native login flow when credentials are missing: