# Agent Delegate: catch headless agent runs that did nothing

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

Agent Delegate: catch headless agent runs that did nothing is a free AI agent skill on Agensi by laika, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [laika](https://www.agensi.io/creators/laika)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Rating: 5.0 out of 5 from 1 review
- Uses: 4
- Version: 1.0
- Last updated: 2026-10-04
- Security: scan passed (2026-10-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/agent-delegate-catch-headless-agent-runs-that-did-nothing
- Tags: ai-agents, bash, git-worktree, automation, ci-cd

## 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.

## Known limitations

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

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Agent Delegate: catch headless agent runs that did nothing skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific problem does Agent Delegate solve for headless workflows?

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.

### Which AI agents are compatible with these scripts?

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.

### What exactly do I receive when I purchase this skill?

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.

### How does the skill handle multiple concurrent agent tasks?

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.

### What does the exit code 65 signify during a run?

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.

### Does this skill automatically review the quality of the agent's code changes?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
