---
name: devxkit-cursor-cost-policy
description: Avoid accidental costly Cursor backend execution; require explicit opt-in.
scope: global
devxkit_commands:
  - devxkit agent run
---

# devxkit cursor cost policy

## When to use

- Before any `devxkit agent run <issue> --backend cursor`
- User asks whether Cursor headless/API execution is allowed
- Dry-run planning for BUILD backends without spending tokens

## Preconditions

- Issue slice exists under `.agent-runs/<issue>/`
- Understand Cursor is **costly/manual by default** in `.project.toml` backend registry
- Real execution needs human authorization for cost and API key usage

## Commands

```bash
devxkit agent run <issue> --backend cursor --dry-run
# Standalone checkout dogfood: uv run --project . devxkit agent run <issue> --backend cursor --dry-run
devxkit agent run <issue> --backend cursor --confirm || true
devxkit agent run <issue> --backend cursor --confirm --allow-costly-backend
```

Expected dry-run output includes: cost profile, manual/costly flags, prompt size warnings, confirmation required, no smoke execution.

## Validation

- **Dry-run:** exit 0; no smoke headless; no issue prompt executed; logs plan only
- **`--confirm` without costly opt-in:** should **block** real execution (governance/cost gate)
- **Real run:** only after explicit user approval **and** `--confirm --allow-costly-backend`
- API key checked by presence only (`CURSOR_API_KEY_SET` / not set) — never print the key

## Common failures

- **`--confirm` alone blocked** → intentional; user has not accepted costly backend
- **Missing API key** → smoke fails; prompt not executed
- **Accidental real run** → always dry-run first; never pass `--confirm` without user instruction
- **Assuming monetary cost in usage** → see `devxkit-usage-observability`; `monetary_cost` is null

## Stop conditions

- Stop if user has **not** explicitly authorized costly Cursor/API execution
- Do **not** pass `--confirm --allow-costly-backend` without human instruction
- Do **not** run smoke or full prompt "to test" without approval
- Prefer **Cursor Composer manual** for daily BUILD; headless is exception
- Do **not** use Big Pickle for code changes

## Related skills

- `devxkit-agent-flow`, `devxkit-usage-observability`
