Context handover

The agent must stop gracefully before its context is exhausted.

  • Check before touching a card for work and before long operations.
  • Use the harness-provided token usage, not a guess.
  • Keep a default 20% reserve; long work needs more.
  • If the work will not fit, do not start it.
  • Finish only a safe in-progress unit.
  • Print a complete handover prompt:
mdboard handover-prompt
mdboard handover-prompt '#0032'

The prompt tells the next session to recover from the repository: mdboard runbook, context, brief, batch-status, next, git status, recent log, board state, decisions, delivered work, next steps, tests, environment and constraints.

The owner may override and continue, but quality degrades; the override is scoped and recorded. mdBoard does not start a new session automatically.