phacility/phabricator · error · PhutilArgumentUsageException
You must specify which daemon to launch.
Error message
You must specify which daemon to launch.
What it means
Usage guard in the daemon launch CLI workflow: fires when, after optionally peeling a numeric daemon count off the front of argv, no daemon name remains. Without a daemon class name there is nothing to launch, so the workflow aborts before building the launch spec.
Solutions
- Provide a daemon class or shorthand, e.g. phd launch taskmaster
- Run phd list for available daemon names
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/daemon/management/PhabricatorDaemonManagementLaunchWorkflow.php:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/51abf49af716008e.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/daemon/management/PhabricatorDaemonManagementLaunchWorkflow.php:42
}
public function execute(PhutilArgumentParser $args) {
$argv = $args->getArg('argv');
$daemon_count = 1;
if ($argv) {
if (is_numeric(head($argv))) {
$daemon_count = array_shift($argv);
}
if ($daemon_count < 1) {
throw new PhutilArgumentUsageException(
pht('You must launch at least one daemon.'));
}
}
if (!$argv) {
throw new PhutilArgumentUsageException(
pht('You must specify which daemon to launch.'));
}
$daemon = array();
$daemon['class'] = array_shift($argv);
$daemon['label'] = $daemon['class'];
$daemon['argv'] = $argv;
$daemons = array_fill(0, $daemon_count, $daemon);
$this->launchDaemons($daemons, $is_debug = false);
return 0;
}
}
View on GitHub (pinned to 5720a38cfe)