Skip to content

CLI

Prompts and context

Give Cortex a clear objective and bounded workspace context.

State the outcome, constraints and validation you expect. Cortex reads only the context allowed for the active workspace and selected attachments; it does not need a full repository dump in the prompt.

Terminal window
cortex exec "Fix the failing parser test, preserve the public API, and run the focused tests" --cwd .
  • Use --file PATH more than once for explicit files or images.
  • Use --related-repository PATH_OR_ID to opt in a related repository at its current revision.
  • Keep repository instructions in AGENTS.md and reusable guidance in a Cortex skill. Repository-provided instructions, hooks and skills require trust.
  • Use --response-mode fast|balanced|deep to express the work profile; routing and availability remain server-controlled.

Use cortex --continue, cortex sessions resume --cwd ., or /resume. Cortex reconciles local cursors with authoritative history, so a remembered local session is never treated as current until the server confirms it.