whatisgithub

What is agent-process-guard?

yanowo/agent-process-guard — explained in plain English

Analysis updated 2026-05-18

18ShellAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A skill for Codex and Claude Code that classifies terminal commands and manages long-running processes so coding agents never hang or leave stray servers running.

Mindmap

mindmap
  root((process-guard))
    What it does
      Classifies commands
      Enforces timeouts
      Manages background processes
    Tech stack
      Shell scripts
      PowerShell
    Use cases
      Prevent agent hangs
      Clean up dev servers
      Check server readiness
    Audience
      Developers using AI coding agents

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Stop an AI coding agent from waiting forever on a command that never finishes.

USE CASE 2

Automatically clean up background dev servers left running after an agent task ends.

USE CASE 3

Check whether a started server is actually ready before the agent continues.

USE CASE 4

Enforce timeouts on finite commands run by Codex or Claude Code.

What is it built with?

ShellPowerShell

How does it compare?

yanowo/agent-process-guardcollindjohnson/agent-notifynnguyenquangg/claude-code-spec-driven-development
Stars181818
LanguageShellShellShell
Setup difficultyeasyeasymoderate
Complexity2/51/53/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install script needs bash or PowerShell, no other runtime dependencies.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the MIT license.

So what is it?

This repository is a small utility designed for AI coding agents, specifically Codex and Claude Code. Its purpose is to prevent a common problem that arises when an AI agent runs terminal commands during coding tasks: some commands run for a long time or never finish on their own (like starting a local development server), and if the agent does not handle these correctly, it can get stuck waiting forever or leave stray processes running in the background after the task ends. The tool works by classifying every command before running it. Commands that finish quickly are run through a wrapper that enforces a time limit, so the agent is never left waiting indefinitely. Commands that are meant to run continuously, like a web server or a file watcher, are started as managed background processes. The tool tracks each process with a file recording its process ID, writes logs, and stores metadata in a folder called .agent-run. When the agent is done, it can stop these background processes cleanly, including any child processes they spawned. For long-running processes like servers, the tool can check whether the process is actually ready by testing a web address, probing a network port, running a custom check command, or looking for a specific message in the log. This avoids the agent proceeding before the server is up. Installation is handled by a shell script or a PowerShell script on Windows. You can install it at the user level so it is available across all projects, or at the repository level so it only applies to one project. The tool works the same way with both Codex and Claude Code. The README is available in Traditional Chinese, Simplified Chinese, Japanese, and Korean in addition to English. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Explain how process-guard classifies commands as finite, long-running, or interactive.
Prompt 2
Walk me through installing process-guard for both Codex and Claude Code at the user level.
Prompt 3
Show me how to use with-managed-process.sh to start a dev server and check it is ready.
Prompt 4
Help me add the persistent AGENTS.md snippet so my agent always uses process-guard.

Frequently asked questions

What is agent-process-guard?

A skill for Codex and Claude Code that classifies terminal commands and manages long-running processes so coding agents never hang or leave stray servers running.

What language is agent-process-guard written in?

Mainly Shell. The stack also includes Shell, PowerShell.

What license does agent-process-guard use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the MIT license.

How hard is agent-process-guard to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is agent-process-guard for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.