Session Sweep

    1

    Detect a Claude Code update and safely cycle stale cmux-hosted sessions (idle now; busy via interrupt-or-wait).

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    session-sweep

    Example session with this skill installed

    A new Claude Code version is out. Sweep the open cmux sessions. Preview with a dry run first, then cycle the idle stale panes. Ask me before interrupting a busy one.

    • Read your context and instructions
    • Compiled the session-sweep

    Protocol lines from sweep.sh (interactive). Report these counts. Do not invent a cycle that did not print.

    CYCLED <surface_id>
    GRACE <surface_id>
    INTERACTIVE_PROMPT <surface_id>
    CYCLE_FAILED <surface_id>
    
    LineAgent action
    CYCLED <surface_id>Done for that pane. Verified back up on the new version.
    CYCLE_FAILED <surface_id>Pane was respawned but did not come back in the verification window. Tell the user to look manually. Do not report it as updated.
    GRACE <surface_id>Stale and idle, still inside the idle grace window (default 15 min, SWEEP_GRACE_SECONDS). No action.
    CYCLE <surface_id>Dry-run preview only (sweep.sh --dry-run). Nothing was cycled.
    INTERACTIVE_PROMPT <surface_id>Busy and stale. Ask Wait vs Interrupt. On Interrupt, run sweep.sh --force-cycle=<surface_id> and check the exit status. Non-zero with FORCE_CYCLE_FAILED means no resume command was found.

    Order: handle every other surface first, report the counts to the user, then optionally self-refresh this driver last via self-cycle /self-refresh. Skip that refresh if the driver is mid-task, a /goal is in flight, or background monitors still need to report.

    If stdout looks empty, read state/last-sweep.log. Output filters can hide the protocol lines; prefer rtk proxy.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    session-sweep

    Check for a Claude Code update and safely cycle open cmux-hosted sessions still on an older version. Idle sessions restart in place (same pane, same conversation via cmux's tracked resume). Busy sessions get an interrupt-or-wait choice.

    Canonical repo: https://github.com/chendrizzy/session-sweep
    Install: npx skills add chendrizzy/session-sweep

    The engine is sweep.sh in that repo (with sweep.bats). This listing is the operating procedure. It does not inline the script.

    Companion: self-cycle (https://github.com/chendrizzy/self-cycle) for refreshing this driver session last.

    When to use

    • User asks to update Claude Code sessions, refresh stale sessions, or mentions a new Claude Code version.
    • Fleet of cmux panes; some still running an older claude binary.
    • Preview: sweep.sh --dry-run before enabling any LaunchAgent.

    When not to use

    • Not on cmux — same hard dependency as self-cycle; no tmux/iTerm fallback.
    • Background-agent surfaces (cmux cannot respawn/restore those).
    • Looping --force-cycle across many surfaces (each call re-runs claude update and serializes on the lock) — cycle one, confirm, then next.
    • Refreshing your own driver mid-sweep — that must be last, via self-cycle /self-refresh, and skipped if mid-task / /goal / pending monitors.
    • Trusting a missing version banner alone — verify with process age (etime).

    Permissions

    NeedWhy
    sweep.sh + bashEngine
    rtk proxy (recommended)Prevents output filters from hiding protocol lines
    cmux with workspace-scoped respawnCycle panes in other workspaces
    claude updateVersion bump + lock
    AskUserQuestionBusy stale sessions
    Writable state / logsstate/last-sweep.log, optional LaunchAgent log

    Expected output

    Run interactive mode:

    rtk proxy ~/.claude/skills/session-sweep/sweep.sh --mode=interactive
    

    If stdout looks empty, read state/last-sweep.log (mirrored each run).

    LineAgent action
    CYCLED <surface_id>Done for that pane
    CYCLE_FAILED <surface_id>Tell user to look manually — do not claim updated
    GRACE <surface_id>Waiting out idle grace; no action
    CYCLE <surface_id>Dry-run preview only
    INTERACTIVE_PROMPT <surface_id>AskUserQuestion Wait vs Interrupt; on Interrupt run --force-cycle=<id> and check exit status

    Order: handle all other surfaces first, report to the user, then optionally self-refresh this driver via self-cycle.

    Install / enable notes (honest)

    Scheduled LaunchAgent must not exec through an external-volume symlink (launchd EX_CONFIG). Prefer a plist that runs /bin/bash <script> and logs under ~/Library/Logs/. Leave enable/disable to the operator.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scanned

    Verified clean 3 days ago

    • Passed all security checks, Safe to install

    Requires

    cmux
    macOS
    bash
    Node.js

    Listed3 days ago

    What's inside

    Frequently Asked Questions