Agent Delegate: catch headless agent runs that did nothing

    by laika

    1

    Run codex exec or any CLI agent on a spec in its own git worktree; get exit 65 when the run changed nothing.

    Free

    4 uses5.0 (1 review)

    Works with the AI Agents you already use

    Agent Delegate: catch headless agent runs that did nothing

    Example session with this skill installed

    Delegate docs/specs/01-json-flag.md to the headless agent in a fresh worktree and tell me whether it actually changed anything.

    • Read your context and instructions
    • Compiled the agent delegate

    Summary

    The agent exited 0 but changed nothing, so delegate.sh returned

    65. This is the real output of delegate.sh against a stand-in agent that only prints a plan and asks "Shall I proceed?" (macOS, bash):

    spec:   ~/myproj / docs/specs/01-json-flag.md
    agent:  ~/fake-agent
    log:    ~/myproj/.delegate-runs/20261004-163927-01-json-flag.log
    
    --- effective settings ---
    model: demo-agent  reasoning effort: high
    --------------------------
    exit=0 / log        2 lines
    
    !! nothing changed - the agent did no work.
       Check the end of the log; it most likely asked for approval or
       reported a blocker:  tail -30 ~/myproj/.delegate-runs/20261004-163927-01-json-flag.log
    

    echo $? after set -o pipefail prints 65.

    CheckResult
    Agent exit code0
    git status / HEAD movedno
    delegate.sh exit code65 (ran, nothing changed)
    Effective settings echoedyes, from the agent's own header

    Next steps

    • Read the last lines of the log. Here the agent stopped at "Shall I proceed?".
    • Add "do not ask for approval, execute the spec" to the spec or extra instructions and run again.
    • After a run that does change files, ./review-status.sh <project> lists the commits still waiting for review.

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

    About this skill

    Headless coding agents can end a run with exit 0 and pass every test while changing nothing. In one workspace this happened when the agent wrote a plan, asked "shall I proceed?", and exited, because nobody was there to answer. The log looked complete. This skill is three bash scripts (68 to 207 lines, bash + git) and a spec template.

    • delegate.sh runs the agent on a spec with stdin closed (from /dev/null), echoes the agent's own config header so you see the effective reasoning effort, compares git status and HEAD before and after, and returns 65 if neither moved. worktree.sh makes one git worktree per task, sharing node_modules. review-status.sh lists agent commits that do not have a review tag yet. SPEC-TEMPLATE.md has a file ownership table, an example table, and runnable acceptance commands.

    Exit codes: 0 changes made, 64 bad usage, 65 ran but nothing changed, 66 project or spec not found, anything else is the agent's own exit code. test.sh reproduces 10 cases with a fake agent (passed 10, failed 0). What it does not do: it does not review the agent's code and it cannot fix a bad spec. It makes a run that did nothing, hung, or lost its exit code visible instead of green.

    Requires Bash/Zsh and Git. Task names cannot contain slashes. Does not evaluate code quality, only execution success and state changes.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 4 times.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Network Access
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill identifies "false positives" where an agent finishes with a success code but fails to actually modify any files or make progress, often due to the agent waiting for user input in a headless environment.

    Agent Delegate is designed to wrap any CLI-based agent or 'codex exec' tool that operates within a Git repository, making it highly versatile across different AI platforms.

    The package includes three core Bash scripts (delegate, worktree, and review-status), a standardized Spec Template for task definitions, and a test suite to verify the setup.

    It uses 'git worktree' to create isolated environments for every task, allowing multiple agent runs to happen simultaneously without file conflicts while sharing bulky directories like node_modules.

    A return code of 65 specifically indicates that the agent finished its process but left the repository in an identical state to when it started, signaling that the run was ineffective.

    No, these scripts focus on the operational integrity of the run; they ensure the agent actually performed work, but they do not evaluate the logic or quality of the code produced.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Free