Session Orient
Do this before the first edit of a session or when picking up a new task. Goal: never start writing code into a blocked or mis-scoped environment.
Also apply on loop resumption after a gap
A /loop or recurring-agent iteration that resumes after a meaningful gap (overnight, multi-hour wait) re-orients first — the world changed while you were away. Run the recon sequence before proceeding to the task, even though the loop is "continuing". Acting on a stale mental model wastes the turn; the state check is cheap and bounds the blast radius of a stale assumption.
Recon sequence
- Agent skills refresh (15-day timer). Read
agent-skills-last-refreshfromauto-mode/SKILL.mdfrontmatter. If due (≥15 days or missing), run~/.cursor/skills/auto-mode/scripts/check-and-refresh.ps1.REFRESH_OKupdates the timestamp in that skill file.NOT_DUE→ skip silently.REFRESH_FAILED→ surface error, do not block informational work. - Disk free space. On Windows:
Get-PSDrive C | Select-Object Used,Free. On POSIX:df -h .. If free space is under ~1 GB, treat the environment as disk-constrained — prefer tasks that don't need Docker / large builds / model downloads, and surface the constraint to the user. - Queue blockers (if this repo uses a task queue). Run the project's blocker command (e.g.
uv run python scripts/pick_task.py blockersorpnpm work:blockers). If a hard blocker is active (disk, docker, db), do not start work that depends on it. - Target path scope. Count files in the area you're about to edit:
Get-ChildItem <path> -Recurse -File -ErrorAction SilentlyContinue | Measure-Object | Select-Object Count(Windows) orfind <path> -type f | wc -l(POSIX). A count near 0 means stub/scaffold; a high count means existing surface to respect. - Git state.
git status --shortandgit log -1 --oneline— know what's dirty and what the last commit was. - Open files / cursor context. Note what the user already has open; it usually indicates the real target.
Output
State, in one or two lines to the user:
- environment health (disk OK / constrained),
- any active blocker and what it rules out,
- the target scope (stub vs. real surface),
- the one task you're about to pick.
Then proceed. Do not pad this — recon is a means to avoid wasted work, not a report to dwell on.
When to skip
- Pure conversational/informational requests.
- A single-file edit the user pointed at explicitly and you already read.
- You already ran recon this session and nothing changed.