Skip to content

feat: add cc-taskrunner plugin — autonomous task queue#32629

Open
stackbilt-admin wants to merge 1 commit intoanthropics:mainfrom
stackbilt-admin:plugin/cc-taskrunner
Open

feat: add cc-taskrunner plugin — autonomous task queue#32629
stackbilt-admin wants to merge 1 commit intoanthropics:mainfrom
stackbilt-admin:plugin/cc-taskrunner

Conversation

@stackbilt-admin
Copy link

Summary

Adds cc-taskrunner, a plugin that turns Claude Code into an autonomous task execution system with safety guarantees.

  • Queue tasks and run them unattended (overnight, during meetings, in CI)
  • Branch isolation — each task runs on auto/{task-id}, main is never touched
  • Three-layer safety — hooks block destructive ops, CLI caps turns, mission brief constrains scope
  • Automatic PRs — completed tasks push branches and create PRs via gh

Plugin contents

Type Name Description
Command /taskrunner Run pending tasks from the queue
Command /taskrunner-add Add a task to the queue
Command /taskrunner-list Show queue status
Agent task-executor Debug and monitor autonomous execution
Safety block-interactive.sh Blocks AskUserQuestion in headless mode
Safety safety-gate.sh Blocks rm -rf, git push --force, DROP TABLE, deploys
Safety syntax-check.sh Advisory TypeScript error detection after edits

Design decisions

  • Safety hooks live in safety/ (not hooks/) so they're only active during autonomous execution, not during interactive sessions
  • Queue file defaults to project root (./queue.json), not plugin directory
  • Uncommitted work is stashed before task execution and restored after
  • Pre-snapshot diffing ensures only task-created files are auto-committed (not pre-existing dirty files)

Production origin

Extracted from AEGIS, a production autonomous AI agent that has executed 80+ tasks across 11 repositories. The safety architecture, branch lifecycle, and mission brief patterns were developed through real incidents — not theoretical design.

Standalone repo: Stackbilt-dev/cc-taskrunner

Test plan

  • Install plugin via claude plugin:add
  • Verify /taskrunner-add creates queue.json with correct task structure
  • Verify /taskrunner-list displays queue status
  • Verify /taskrunner --dry-run previews without executing
  • Verify /taskrunner --max 1 executes a single task on isolated branch
  • Verify safety hooks block AskUserQuestion and destructive commands during execution
  • Verify stash/pop protects uncommitted work

🤖 Generated with Claude Code

Adds a task queue plugin that runs Claude Code sessions unattended
with safety hooks, branch-per-task isolation, and automatic PR creation.

Commands: /taskrunner, /taskrunner-add, /taskrunner-list
Agent: task-executor for debugging failed tasks
Safety: block-interactive, safety-gate, syntax-check (only active
during autonomous execution, not interactive sessions)

Extracted from production use across 80+ tasks in 11 repositories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant