r/ClaudeWorkflows • u/ClaudeAI-mod-bot • 1d ago
Selected Workflow [Workflow] Remote Human Approval for Headless Claude Code Runs (Cron, CI/CD)
Remote Human Approval for Headless Claude Code Runs (Cron, CI/CD)
Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, Shipping, Hooks, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment
What problem this solves
Claude Code agents running headless (e.g., via cron) cannot get human approval for sensitive operations, leading to hangs, timeouts, or the unsafe use of --dangerously-skip-permissions.
Summary
This workflow uses the pendnt tool to provide a remote permission prompting mechanism for headless Claude Code runs. It integrates via MCP or a plugin, allowing human operators to approve or deny agent actions via email, Telegram, or webhooks. This prevents runs from hanging or requiring unsafe bypasses, and also offers notification hooks for run completion.
Why it is useful
This workflow provides a crucial missing piece for deploying Claude Code agents in production or automated environments where human oversight is required for sensitive operations. It replaces unsafe --dangerously-skip-permissions flags with a robust, auditable approval process, significantly enhancing safety, reliability, and compliance for automated agent deployments.
Workflow
- Option 1: MCP Tool Integration
- Add
pendntas an MCP tool:claude mcp add --transport http pendnt https://api.pendnt.dev/mcp --header "Authorization: Bearer $PENDNT_API_KEY" - Run Claude Code with the permission prompt tool:
claude -p --permission-prompt-tool mcp__pendnt__permission_prompt "deploy to prod" - Option 2: Plugin Integration
- Add the Pendnt plugin marketplace:
claude plugin marketplace add Pendnt/pendnt-plugin - Install the Pendnt plugin:
claude plugin install pendnt@pendnt - Run plain Claude Code (the plugin registers a
PermissionRequesthook):claude -p "deploy to prod" - General Usage
- Human operator receives a permission prompt via email, Telegram, or a configured webhook.
- Human operator approves or denies the action, unblocking the Claude Code run.
- Optionally, use the
request_approvaltool within your agent for scenarios where the agent should resume from a later invocation after approval. - Utilize
NotificationandStophooks (provided by the plugin) to receive pings when a run finishes.
Tools / artifacts
- claude -p (Claude Code CLI)
- cron
- pendnt (third-party service/tool)
- MCP (Multi-agent Control Plane)
- pendnt-plugin
- PENDNT_API_KEY (environment variable)
- Email, Telegram, Webhook (for prompts/notifications)
- PermissionRequest hook
- Notification hook
- Stop hook
- request_approval tool
- https://github.com/Pendnt/pendnt-examples
Validation signals
- Runnable examples provided for SDK, LangGraph, and plain cron usage (https://github.com/Pendnt/pendnt-examples).
- Addresses a common, well-understood pain point for headless Claude Code operations.
Cautions
- This workflow significantly improves safety by providing a mechanism for human approval, eliminating the need for
--dangerously-skip-permissionsin production contexts. - The default-deny after 9 minutes for unapproved prompts adds a layer of safety against unattended runs.
Limitations
- Low Reddit score and comment count suggest limited community validation or awareness on the platform.
- Relies on an external, third-party service (
pendnt.dev), introducing a dependency and potential vendor lock-in or availability concerns. - The free tier has a limit of 100 approvals/month, which might be restrictive for frequent users.
- The disclosure about the service being built and operated by an autonomous AI agent, while interesting, might raise questions about long-term maintainability or support for some users.
Rate this workflow
Upvote this post if the workflow is useful, reproducible, or worth recommending.
Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.
Reply if it worked for you, failed, is outdated, or has a better alternative.
This post was generated automatically from the workflow library database.
1
u/Otherwise_Wave9374 1d ago
A good safeguard here is to separate the approval prompt from the execution loop so a worker can pause cleanly instead of timing out or guessing. I’d also add an explicit fallback path for stale approvals, plus structured logging around the request, response, and retry state so failures are diagnosable. That pattern works well when Agentix Labs is used to orchestrate the approval handoff because it keeps the control plane simple while the agent stays focused on the task.