overnight

overnight is a command for coding agents from MartyBonacci/specswarm. It costs 103 tokens per session (3,592 once invoked), scanned A, original, MIT.

A command for running a prepared SpecSwarm development task without interactive input, including preparation, implementation, verification, and a retrospective. It offers a check mode and an opt-in execution mode.

In plain words
What is it for?
Use it to prepare, execute, verify, and review an overnight coding task, or to generate local scheduler instructions for macOS or Linux.
Why use it?
It lets a prepared coding task run on a schedule while you are away, while the default check mode can validate readiness first. It also explains how to schedule local repository work with cron, systemd, or launchd.

Command

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/martybonacci/specswarm/overnight
Clone the repo
git clone --depth 1 https://github.com/MartyBonacci/specswarm

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for overnight

README.md
[![agentmods](https://agentmods.dev/badge/commands/martybonacci/specswarm/overnight.svg)](https://agentmods.dev/commands/martybonacci/specswarm/overnight)
Your own site
<a href="https://agentmods.dev/commands/martybonacci/specswarm/overnight"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/overnight.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,592 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00103 $0.03592
Opus 5 $0.00051 $0.01796
Sonnet 5 $0.00021 $0.00718
Haiku 4.5 $0.00010 $0.00359

Measured 5d ago against content hash a73716d6b28c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

overnight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ss/commands/overnight.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SpecSwarm Overnight Autonomous Execution

Marty's most ambitious automation. Pre-batch decisions before bed, schedule this command to run between 10pm-6am, wake to a green PR or a phone notification flagging exactly what needs attention.

This is the most invasive command in v7.x — it spawns a long-running headless Claude session that costs real tokens and lands real commits. Conservative defaults: --check mode validates readiness without executing. --exec is the explicit opt-in.

Architectural reality check: The /schedule plugin runs scheduled agents in Anthropic's remote infrastructure — they cannot touch a local filesystem. The right scheduler for "run /ss:implement on my local repo overnight" is the LOCAL OS scheduler: cron (Linux/macOS), systemd timer (Linux), launchd (macOS). /ss:overnight --schedule prints copy-paste snippets for all three.

Subcommand dispatch

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/features-location.sh"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/overnight/state.sh"
# shellcheck disable=SC1091
source "${PLUGIN_DIR}/lib/overnight/preflight.sh"

# Parse args
SUBCOMMAND="check"
FEATURE_NUM=""
TIMEOUT=28800
ALLOW_DIRTY=false
TAIL_LINES=60

while [ $# -gt 0 ]; do
  case "$1" in
    --timeout)     TIMEOUT="$2";     shift 2 ;;
    --allow-dirty) ALLOW_DIRTY=true; shift ;;
    --tail)        TAIL_LINES="$2";  shift 2 ;;
    check|status|logs|exec|abort|schedule)
      SUBCOMMAND="$1"; shift ;;
    -h|--help)
      cat <<EOF
Usage: /ss:overnight [SUBCOMMAND] [FEATURE_NUM] [options]

Subcommands:
  check     (default) Validate readiness without executing
  status              Show last/current overnight run state
  logs                Tail .specswarm/overnight.log
  exec                EXEC: dispatch headless claude --print (costs tokens)
  abort               Send SIGTERM to a running overnight run
  schedule            Print cron/systemd/launchd snippets

Options:
  --timeout N       Wall-clock cap in seconds (default 28800 = 8h)
  --allow-dirty     Permit uncommitted working tree changes
  --tail N          Lines for logs subcommand (default 60)

State lives at: .specswarm/overnight.{pid,log,state}
Output log:     <feature_dir>/overnight.output.log

Examples:
  /ss:overnight                       # check readiness for current feature
  /ss:overnight check 003
  /ss:overnight schedule              # show cron/systemd/launchd snippets
  /ss:overnight exec --timeout 14400  # run NOW with 4h cap
  /ss:overnight status
  /ss:overnight logs --tail 200
  /ss:overnight abort
EOF
      exit 0
      ;;
    *)
      [ -z "$FEATURE_NUM" ] && FEATURE_NUM="$1"
      shift
      ;;
  esac
done

REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)

# Resolve feature unless we're in a mode that doesn't need it
case "$SUBCOMMAND" in
  status|logs|abort|schedule)
    : ;;
  *)
    if [ -z "$FEATURE_NUM" ]; then
      BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
      FEATURE_NUM=$(echo "$BRANCH" | grep -oE '^[0-9]{3}' || echo "")
    fi
    if [ -z "$FEATURE_NUM" ]; then
      get_features_dir "$REPO_ROOT"
      FEATURE_NUM=$(find "$FEATURES_DIR" -maxdepth 1 -type d -name '[0-9][0-9][0-9]-*' 2>/dev/null \
        | sort | tail -1 | xargs -n1 basename 2>/dev/null \
        | grep -oE '^[0-9]{3}' || echo "")
    fi
    if [ -z "$FEATURE_NUM" ]; then
      echo "❌ No feature number provided and no feature dirs found." >&2
      exit 2
    fi
    if ! find_feature_dir "$FEATURE_NUM" "$REPO_ROOT"; then
      echo "❌ Feature $FEATURE_NUM not found." >&2
      exit 2
    fi
    ;;
esac

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 367 lines · 103 tokens per session scan A a73716d6b28c

Subscribe to this mod's changes

overnight is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 103 tokens to every session and 3,592 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.