cli-agent-runner

Run long-running Claude Code tasks in named sessions with background execution and result extraction.

Updated Oct 30, 2025
One-click install
npx skills add https://github.com/rawe/claude-dev-skills --skill cli-agent-runner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-agent-runner
Source: https://github.com/rawe/claude-dev-skills/tree/main/cli-agent-runner/skills/cli-agent-runner
Command: npx skills add https://github.com/rawe/claude-dev-skills --skill cli-agent-runner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies invoking long-running Claude Code tasks by exposing a simple, named session runner. It hides the complexity of session IDs, supports background execution with polling, and standardizes result extraction so you can focus on the task rather than orchestration.

Core Features & Use Cases

  • Named sessions: Create, resume, and monitor Claude Code work using memorable session names instead of IDs.
  • Background execution & polling: Run tasks in the background and check for completion without blocking your workflow.
  • Automatic result extraction: Cleanly capture and present the task result on stdout while sending errors to stderr.
  • Agent support: Optional agent definitions to tailor behavior for specialized tasks.

Quick Start

Start a new session named architect with the prompt "Design a high-level architecture document for a user authentication system".

  1. Determine the path to the script: Identify the root folder of the plugin skill and append the script name: <path-to-skill-root-folder>/cli-agent-runner.sh
  2. Start a new session: <absolute-path-to-cli-agent-runner.sh> new architect -p "Design a high-level architecture document for a user authentication system"
  3. Later, resume or check status: <absolute-path-to-cli-agent-runner.sh> resume architect -p "Add API endpoint specs"

Frequently Asked Questions about cli-agent-runner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate long-running Claude Code tasks with session management?

Named session management lets you delegate tasks to a persistent wrapper that tracks work by name, handles background execution, and extracts results automatically. Start a new session with a prompt, then resume it later by name to continue or check status without managing session IDs manually.

Can I run Claude Code tasks in the background and poll for results?

Yes. The session runner supports background execution where tasks run asynchronously while you continue your workflow. Poll a named session to check completion status and retrieve results when ready, eliminating blocking calls.

How do I resume a Claude Code session by name instead of ID?

Use the resume command with your session name and an optional new prompt to continue work. The runner tracks session state by name, so you reference memorable identifiers rather than opaque IDs.

What's the best way to coordinate multi-session workflows with Claude Code?

Orchestrate specialized sessions using named identifiers and optional agent definitions for each session. The runner coordinates session lifecycle, prompt delivery via CLI flags or stdin, persistent history, and automatic result extraction to stdout.

Do I need to configure external tools to use session management with Claude Code?

External tool access via MCP configurations is optional. Named sessions work standalone for straightforward tasks; add MCP configs only if your workflow requires specialized tool integrations.