Command Reference

Every current activation command, hook, runtime command, session marker, test command, and canonical term — all in one place. If you need the vocabulary first, read Glossary and Compatibility.

Reader docs: Start Here for the task map, Audience for the reader matrix, and Compatibility for runtime differences.

Delegation Skills

CommandDescription
/sidekick:kay-delegateActivate Kay sidekick mode for the current session and route implementation through kay exec.
/sidekick:kay-delegate xiaomiActivate Kay mode with Xiaomi routing for the session.
/sidekick:kay-delegate ocgActivate Kay mode with OpenCode Go routing for the session.
/sidekick:kay-stopDeactivate Kay sidekick mode and clear the Kay session marker.
/sidekick:codex-delegateActivate Codex sidekick mode for the current session and route implementation through local codex exec.
/sidekick:codex-stopDeactivate Codex sidekick mode and clear the Codex session marker.

Plugin Hooks

Sidekick ships PreToolUse and PostToolUse hooks. They stay dormant until a user explicitly starts Kay or Codex delegation for the current session. The shared active-sidekick selector is a mutual-exclusion gate: it must point at kay or codex before matching hooks enforce delegation behavior.

HookEventDescription
codex-delegation-enforcer.shPreToolUse (Write / Edit / NotebookEdit / Bash)Denies direct implementation edits while Kay or Codex mode is active, rewrites supported runtime commands, and records audit metadata.
codex-progress-surface.shPostToolUse (Bash)Parses Kay or Codex subprocess output, strips terminal controls, redacts obvious secrets, and emits compact progress summaries.

Kay Runtime Commands

Start Kay mode through /sidekick:kay-delegate. These lower-level runtime commands are what active Kay mode uses after activation:

CommandPurpose
kay exec "<task>"Native Kay runtime command used after Kay mode is active.
kay login --provider opencode-go --with-api-keyConfigure OpenCode Go credentials for the Kay provider path.
SIDEKICK_KAY_PROVIDEREnvironment override for Kay provider routing.

Runtime Commands

After activation, Sidekick routes child implementation work through the selected runtime:

SidekickChild commandManaged contract
Kaykay execProvider selected by default routing, xiaomi, ocg, or SIDEKICK_KAY_PROVIDER.
Codexcodex execgpt-5.4-mini, model_reasoning_effort=xhigh, workspace-write, --ask-for-approval never.

Session State

Sidekick uses session markers so hooks enforce only after explicit activation.

PathPurpose
~/.sidekick/sessions/<session>/active-sidekickContains kay or codex; only one sidekick is active per host session.
.kay/sessions/<session>/.kay-delegation-activeKay mode marker.
.codex/sessions/<session>/.codex-delegation-activeCodex mode marker.
.kay/conversations.idxProject-local Kay audit ledger.
.codex/conversations.idxProject-local Codex audit ledger.

Verification Tests

Current strict and release checks:

CommandPurpose
bash tests/run_unit.bashStrict non-live unit and integration suites.
bash tests/run_all.bashSkip-safe aggregate suite.
bash tests/run_in_kay.bash SIDEKICK_LIVE_CODEX=1 bash tests/run_release.bashKay-hosted live release gate.

Progress Surfaces

Sidekick surfaces bounded, redacted progress output from child runtimes. The host treats these summaries as useful context, not proof of completion.

FieldDescription
[KAY]Bounded Kay subprocess output while Kay mode is active.
[KAY-SUMMARY]Compact Kay status block when Kay emits structured progress.
[CODEX]Bounded Codex subprocess output while Codex mode is active.
[CODEX-SUMMARY]Compact Codex status block when Codex emits structured progress.
Example Codex child runtime
codex exec -m gpt-5.4-mini -c model_reasoning_effort=xhigh --sandbox workspace-write --ask-for-approval never "<task>"
Progress is not verification. The host still checks the diff, integration points, and relevant commands before reporting completion.

AGENTS.md Format

Project-level AGENTS.md remains the instruction surface for hosts and sidekicks. It should describe supported sidekicks, project conventions, generated surfaces, tests, integrity workflow, and release discipline.

Project AGENTS.md
# Project Instructions ## Project Conventions - Repo-specific structure and naming rules ## Delegation Contract - Host AI plans, communicates, delegates, verifies, and owns final correctness ## Host Verification - Check MISSED_REQUIREMENT, INTEGRATION_ERROR, REGRESSION, WRONG_LOGIC, SYNTAX_ERROR, WRONG_FILE, UNVERIFIED_ASSUMPTION, KNOWLEDGE_GAP, MISUNDERSTOOD_TASK, TRIAL_INCOMPLETE, API_FAILURE, EXECUTION_ERROR_EXTERNAL

File Structure

Files created and managed by Sidekick:

PathPurpose
skills/kay-delegate/SKILL.mdCanonical Kay delegate workflow and runtime guidance
skills/kay-stop/SKILL.mdCanonical Kay stop workflow
skills/codex-delegate/SKILL.mdCanonical Codex delegate workflow and runtime guidance
skills/codex-stop/SKILL.mdCanonical Codex stop workflow
~/.sidekick/sessions/<session>/active-sidekickShared selector containing kay or codex
.kay/sessions/<session>/.kay-delegation-activeKay state marker used by Kay hooks when Kay mode is active
.codex/sessions/<session>/.codex-delegation-activeCodex state marker used by Codex hooks when Codex mode is active
.kay/conversations.idxProject-local Kay task lookup ledger
.codex/conversations.idxProject-local Codex task lookup ledger
AGENTS.mdProject-level host and sidekick instructions