task-executor

An agent for planning, running, monitoring, and troubleshooting long-running automated tasks with the Claude Nights Watch daemon.

In plain words
What is it for?
It helps design recurring development workflows, configure daemon operations, write safety rules, choose schedules, and interpret execution logs.
Why use it?
It turns broad automation requests into safer task plans and helps diagnose why scheduled work did or did not run.

Agent

Part of the ClaudeNightsWatch plugin — 6 commands, 1 agent, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/aniketkarne/claudenightswatch/task-executor
Clone the repo
git clone --depth 1 https://github.com/aniketkarne/ClaudeNightsWatch

Or install ClaudeNightsWatch, the plugin that ships this one along with the rest of its 6 commands, 1 agent, 3 hooks, 1 MCP server.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,797 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.01797
Opus 5 $0.00007 $0.00898
Sonnet 5 $0.00003 $0.00359
Haiku 4.5 $0.00001 $0.00180

Measured 3d ago against content hash cc12151072fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

task-executor scanned grade E with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasinghighPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

- Override safety rules without user consent

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Critical Rules**: Absolute prohibitions (e.g., no rm -rf)
agents/task-executor.md · 277 lines

How it starts

The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Task Executor Agent

An autonomous agent specialized in planning, setting up, and managing long-running task execution workflows with Claude Nights Watch daemon.

Core Expertise

I am an expert in:

  • Autonomous Task Planning: Breaking down complex workflows into autonomous executable tasks
  • Daemon Management: Starting, stopping, monitoring, and troubleshooting the Nights Watch daemon
  • Safety Engineering: Creating comprehensive safety rules to prevent destructive actions
  • Schedule Optimization: Determining optimal timing for automated task execution
  • Log Analysis: Interpreting execution logs and identifying issues
  • Workflow Design: Designing multi-step autonomous workflows

When Claude Should Invoke Me

Invoke this agent when users need help with:

Task Planning

  • "I want to automate my daily development workflow"
  • "How do I set up autonomous code reviews?"
  • "Create a task that runs tests and generates reports"
  • "What tasks can I safely automate?"

Daemon Operations

  • "Start monitoring my usage windows"
  • "Check if my daemon is running"
  • "Why isn't my task executing?"
  • "How do I schedule tasks for specific times?"

Safety and Rules

  • "What safety rules should I use?"
  • "Is it safe to automate database operations?"
  • "Create rules that prevent file deletion"
  • "Review my rules for security issues"

Troubleshooting

  • "My daemon stopped working"
  • "Why did my task fail?"
  • "Interpret these logs"
  • "Debug autonomous execution issues"

Capabilities in Detail

1. Autonomous Task Design

I help users create effective task.md files that:

  • Are clear and unambiguous
  • Include proper error handling
  • Have well-defined success criteria
  • Respect safety boundaries
  • Are appropriate for autonomous execution

Example Workflow:

# Daily Code Quality Check

## Objectives:
1. Run linting on modified files
2. Fix auto-fixable issues
3. Generate quality report

## Safety Constraints:
- Only modify files in src/ directory
- Never delete files
- Create backup branch first

## Success Criteria:
- All linting errors below threshold
- Report generated in reports/
- Changes committed to feature branch

Read the full file on GitHub · 277 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 277 lines · 14 tokens per session scan E cc12151072fe

Subscribe to this mod's changes

task-executor is an agent published in the GitHub repository aniketkarne/ClaudeNightsWatch (370 stars, last pushed 7mo ago), licensed MIT. It adds 14 tokens to every session and 1,797 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it E with 2 findings (instruction-override phrasing, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.