devteam-reset

A command for stopping a current DevTeam session and resetting its saved state. It can target one session or remove session history and temporary files.

In plain words
What is it for?
Use it to abort a session, record why it was stopped, clear history while keeping plans, perform a full reset, or reset a specific session.
Why use it?
It helps recover when a development session is stuck or has entered an unwanted state. A dry-run option lets you see what would change first.

Command

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/michael-harris/devteam/devteam-reset
Clone the repo
git clone --depth 1 https://github.com/michael-harris/devteam
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,588 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.00000 $0.01588
Opus 5 $0.00000 $0.00794
Sonnet 5 $0.00000 $0.00318
Haiku 4.5 $0.00000 $0.00159

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

Security

Grade A, and why

devteam-reset 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 2d 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.

commands/devteam-reset.md · 280 lines

How it starts

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

DevTeam Reset Command

Command: /devteam:reset [options]

Reset state, clear stuck sessions, and recover from errors.

Usage

# Abort current session and reset state
/devteam:reset

# Abort with specific reason
/devteam:reset --reason "Changing approach"

# Clear all session history (keep plans)
/devteam:reset --clear-history

# Full reset (clear everything except config)
/devteam:reset --full

# Reset specific session
/devteam:reset --session session-20260129-103045-abc123

# Dry run (show what would be reset)
/devteam:reset --dry-run

Options

Option Description
--reason <text> Reason for reset (logged)
--clear-history Clear all session history
--full Full reset (sessions, history, temp files)
--session <id> Reset specific session
--dry-run Show what would be reset without doing it
--force Skip confirmation prompts

Your Process

Basic Reset (Abort Current Session)

source scripts/state.sh
source scripts/events.sh

# Check for running session
if is_session_running; then
    SESSION_ID=$(get_current_session_id)

    # Log the abort
    log_event "session_aborted" "system" "User initiated reset" \
        "{\"reason\": \"$REASON\"}"

    # End session
    end_session "aborted" "${REASON:-User reset}"

    echo "Session $SESSION_ID aborted."
else
    echo "No active session to reset."
fi

# Reset circuit breaker state
sqlite3 "$DB_FILE" "
    UPDATE sessions
    SET circuit_breaker_state = 'closed',
        consecutive_failures = 0
    WHERE status = 'running';
"

Clear History

if [[ "$CLEAR_HISTORY" == "true" ]]; then
    # Confirm
    if [[ "$FORCE" != "true" ]]; then
        read -p "Clear all session history? This cannot be undone. [y/N] " confirm
        if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then
            echo "Cancelled."
            exit 0
        fi
    fi

    # Clear history tables
    sqlite3 "$DB_FILE" "
        DELETE FROM events;
        DELETE FROM agent_runs;
        DELETE FROM gate_results;
        DELETE FROM escalations;
        DELETE FROM interviews;
        DELETE FROM interview_questions;
        DELETE FROM research_sessions;
        DELETE FROM research_findings;
        DELETE FROM sessions WHERE status != 'running';
    "

    echo "Session history cleared."
fi

Read the full file on GitHub · 280 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. 2d ago First seen · 280 lines · 0 tokens per session scan A e8ff79936236

Subscribe to this mod's changes

devteam-reset is a command published in the GitHub repository michael-harris/devteam (18 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,588 tokens. 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.