# hermes process reaper

> Prevents process leaks and duplicate background jobs with an automated registry and TTL-based reaper.

hermes process reaper is a free AI agent skill on Agensi by NZ1Labs, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [NZ1Labs](https://www.agensi.io/creators/nz1labs)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Rating: 5.0 out of 5 from 1 review
- Uses: 6
- Version: 1.0
- Last updated: 2026-09-17
- Security: scan passed (2026-09-17); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/hermes-process-reaper
- Tags: automation, llm-ops, process-management, resource-optimization, background-tasks

## About this skill

### The problem

Background tasks often leak, leading to stale processes that poll context for hours or duplicate expensive research passes. This results in context pollution and wasted API credits when multiple agents spawn identical jobs for the same task.

### What it does

- Registers every spawned background job with PID, purpose hash, and TTL in a persistent local registry.
- Prevents duplicate spawns by checking the registry for existing processes with the same purpose hash.
- Automatically reaps orphaned processes at session end or every 30 minutes based on parent task status.
- Discards late-arriving output from killed processes to prevent context corruption.
- Enforces mandatory API key redaction at the moment of process spawning to prevent credential leaks.

### Why this beats prompting it yourself

Standard agents lack a persistent registry to track background state across sessions. This skill implements a rigorous lifecycle management system that handles process cleanup and deduplication, which simple prompting cannot reliably enforce during complex multi-step research tasks.

### Use cases

- Managing long-running research tasks that need to survive intermittent agent disconnections.
- Preventing redundant API calls when re-running research scripts during the same session.
- Cleaning up failed processes that continue to run with invalid or expired credentials.

### Known limitations

Requires local filesystem access for the SQLite or JSON registry. Default TTL for research spawns is strictly capped at 10 minutes.

## 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 hermes process reaper 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

### How does this skill prevent wasted API credits during long research sessions?

It prevents 'zombie processes' and duplicate API calls by maintaining a persistent registry of all background tasks, ensuring that identical research jobs aren't run twice and that crashed tasks are automatically terminated.

### What are the specific system requirements for running the hermes process reaper?

The reaper is compatible with any AI agent or framework that has local filesystem access, as it requires a stable location to store its SQLite or JSON process registry.

### What happens if the agent tries to start a task that is already running in the background?

If a job is already running with a matching 'purpose hash,' the skill will block the new spawn and provide a reference to the existing process, preventing redundant execution and context pollution.

### Can I customize the Time-to-Live (TTL) for my background processes?

The skill includes a pre-configured reaper script that runs every 30 minutes by default, but users can also trigger an immediate cleanup at the end of a session or via manual command.

### What exactly is included in the download for this skill?

You will receive the core process registry module, the automated reaper utility, and a set of integration instructions for incorporating the lifecycle management into your existing agent workflows.

### Does this skill help with security when spawning processes that require API keys?

Yes, the skill features a mandatory redaction layer that automatically identifies and strips API keys and sensitive credentials from process arguments at the moment of spawning.

---

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.
