run-droid

Invokes Factory's droid CLI as a headless executor for delegated coding tasks.

1|1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/gabesan21/project-of-projects --skill run-droid-gabesan21
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: run-droid
Source: https://github.com/gabesan21/project-of-projects/tree/main/.agents/skills/run-droid
Command: npx skills add https://github.com/gabesan21/project-of-projects --skill run-droid-gabesan21

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Delegating coding work to Factory's droid agent from an orchestrator requires knowing the correct headless invocation, autonomy flags, session handling, and output parsing — getting any of these wrong causes TUI hangs, partial changes, or unparsable output. ## Core Features & Use Cases - Headless execution: Runs droid exec without the TUI, with JSON output (-o json) that yields a single result object containing result, session_id, and error status for pipeline parsing. - Autonomy and yolo mode: Documents the --skip-permissions-unsafe bypass mode, the native --auto autonomy ladder, and the fail-fast behavior when permissions are insufficient. - Sessions and follow-ups: Continue work with -s/--session-id, fork sessions, tag runs for CI observability, and resume interactively. - Use Case: An orchestrator needs droid to fix a bug in an isolated git worktree: it runs droid exec --skip-permissions-unsafe -o json --cwd /path/worktree -m claude-sonnet-4-6 "Fix bug X" and extracts the final answer with jq -r '.result'. ## Quick Start Ask the agent to run a scoped coding task through droid in headless mode with JSON output and return the result and session id.

Frequently Asked Questions about run-droid

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

FAQPage Schema
How do I run droid CLI headless without the TUI?▼

Use `droid exec` with a prompt as a positional argument, file, or pipe — it runs to completion without the TUI and exits with a status code. Never call bare `droid` in automation, since that opens the interactive TUI.

How do I parse droid exec JSON output?▼

Pass `-o json` and droid emits a single JSON object at the end containing result, session_id, is_error, and duration fields. Extract values with jq, for example `droid exec -o json "..." | jq -r '.result'` for the final answer.

What is the difference between --skip-permissions-unsafe and --auto in droid?▼

--skip-permissions-unsafe bypasses all confirmations entirely, while --auto uses a graduated autonomy ladder from low to high. The two flags are mutually exclusive, and passing both is an error.

How do I continue a previous droid session?▼

Capture the session_id from the JSON result of the first run, then pass it with `-s <session_id>` along with a new prompt. You can also fork a session with `--fork <id>` or resume interactively with `droid --resume`.

Why does droid exec fail with a permission error?▼

A non-zero exit with a permission error is the autonomy fail-fast: the requested action exceeds the configured autonomy level, and droid stops with no partial changes. In yolo mode with --skip-permissions-unsafe this does not occur.

Does droid exec require authentication setup first?▼

Yes, droid must already be logged in by the human or have FACTORY_API_KEY set in the environment before invocation. If output mentions credentials, API keys, or 401 errors, abort the task entirely rather than retrying.