phacility/phabricator · warning · PhutilArgumentUsageException
This build plan can not be run manually.
Error message
This build plan can not be run manually.
What it means
The plan exists but canRunManually() is false. In this codebase that method returns false exactly when the plan is an 'autoplan' (a generated, built-in plan keyed by planAutoKey, e.g. the ones driving internal publishing), and true otherwise. Manual execution from the CLI (or the UI's Run button, which uses the same check) is therefore refused.
Source
Thrown at src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php:74
$plan_id = $args->getArg('plan');
if (!$plan_id) {
throw new PhutilArgumentUsageException(
pht(
'Use %s to specify a build plan to run.',
'--plan'));
}
$plan = id(new HarbormasterBuildPlanQuery())
->setViewer($viewer)
->withIDs(array($plan_id))
->executeOne();
if (!$plan) {
throw new PhutilArgumentUsageException(
pht('Build plan "%s" does not exist.', $plan_id));
}
if (!$plan->canRunManually()) {
throw new PhutilArgumentUsageException(
pht('This build plan can not be run manually.'));
}
$console = PhutilConsole::getConsole();
$buildable = HarbormasterBuildable::initializeNewBuildable($viewer)
->setIsManualBuildable(true)
->setBuildablePHID($buildable->getHarbormasterBuildablePHID())
->setContainerPHID($buildable->getHarbormasterContainerPHID())
->save();
$buildable->sendMessage(
$viewer,
HarbormasterMessageType::BUILDABLE_BUILD,
false);
$console->writeOut(
"%s\n",View on GitHub (pinned to 5720a38cfe)
Solutions
- Use a user-created plan's ID for manual runs; autoplans are invoked internally by the application and cannot be started by hand.
- Identify autoplan rows by their planAutoKey (non-null) or by the 'Generated Plan' style naming/URI in the UI, and exclude them from scripts.
- If you genuinely need to run the same steps manually, recreate them in a new plan.
Defensive patterns
Strategy: validation
Validate before calling
if ($plan->isAutoplan() || !$plan->canRunManually()) {
// cannot be run by hand; pick a user-created plan instead
} Type guard
function isManuallyRunnablePlan(HarbormasterBuildPlan $plan) {
return $plan->canRunManually();
} Prevention
- Filter plan lists with canRunManually() before offering them to automation or users.
- Remember autoplans (generated, planAutoKey set) are internal-only; never target them with manual runs.
When it happens
Trigger: Passing the ID of an autoplan (internal generated plan) to `harbormaster build --plan`; plans whose planAutoKey column is set because they were created by Harbormaster itself rather than a user.
Common situations: Discovering a plan ID via the database or a build record and trying to run it manually; expecting every row in the plan table to be runnable.
Related errors
- Choose an archival mode with --mode.
- Unknown mode "%s". Valid modes are: %s.
- Specify exactly one buildable object, by object name.
- No such buildable "%s"!
- Object "%s" is not a buildable!
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/2b0f1b1828f98b50.
Report an issue: GitHub.