CPA 401 Cleanup
Use this skill for manual CPA cleanup work.
Default safe path
- Run
scripts/scan_cpa.pyto fetch inventory and export401/quotaJSON files. - Review counts and samples.
- If the goal is delete-only cleanup, run
scripts/delete_401_only.pyagainst the exported401JSON. - Optionally rescan to verify.
Guardrails
- Do not default to
cpa-warden.py --mode maintainfor delete-only work. That flow may also disable or delete quota accounts depending on settings. - Keep token out of committed config files. Prefer
CPA_TOKEN/CPA_BASE_URLenv vars or ad-hoc CLI args. - For local Docker CPA, the common base URL is
http://127.0.0.1:8317. - For non-trivial or destructive runs, summarize the counts before executing.
Scripts
scripts/scan_cpa.py— scan inventory, probe codex accounts, export401andquotaJSONscripts/delete_401_only.py— read exported401JSON and delete only those accountsscripts/reenable_quota.py— read exported quota JSON and re-enable those accounts
Read references/workflow.md for command examples and recovery flow.
