phacility/phabricator · error · PhutilArgumentUsageException

Unable to load bulk job with ID "%s".

Error message

Unable to load bulk job with ID "%s".

What it means

A --id was supplied but PhabricatorWorkerBulkJobQuery could not load a visible bulk job with that ID, so the workflow throws. Causes include a genuinely nonexistent ID, a typo, or an ID from a different install. It is a terminal usage error, not a retryable failure.

Source

Thrown at src/applications/transactions/bulk/management/PhabricatorBulkManagementMakeSilentWorkflow.php:38

          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $viewer = $this->getViewer();

    $id = $args->getArg('id');
    if (!$id) {
      throw new PhutilArgumentUsageException(
        pht('Use "--id" to choose a bulk job to make silent.'));
    }

    $job = id(new PhabricatorWorkerBulkJobQuery())
      ->setViewer($viewer)
      ->withIDs(array($id))
      ->executeOne();
    if (!$job) {
      throw new PhutilArgumentUsageException(
        pht(
          'Unable to load bulk job with ID "%s".',
          $id));
    }

    if ($job->getIsSilent()) {
      echo tsprintf(
        "%s\n",
        pht('This job is already configured to run silently.'));
      return 0;
    }

    if ($job->getStatus() !== PhabricatorWorkerBulkJob::STATUS_CONFIRM) {
      throw new PhutilArgumentUsageException(
        pht(
          'Work has already started on job "%s". Jobs can not be '.
          'reconfigured after they have been started.',
          $id));

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Re-check the job ID in the bulk job list / daemon console on the same install.
  2. Confirm the job still exists and has not been cleaned up by garbage collection.
  3. Ensure you are running the command against the environment that owns the job.

Example fix

# before
bin/bulk make-silent --id 9182
# after (verify the ID exists first)
bin/bulk make-silent --id 918  # the ID shown in the Bulk Jobs UI
Defensive patterns

Strategy: validation

Validate before calling

# confirm the ID appears in the bulk job list before acting
grep -qw "$JOB_ID" <(bin/bulk list 2>/dev/null) || {
  echo "no bulk job $JOB_ID on this install" >&2; exit 2;
}

Try / catch

Catch PhutilArgumentUsageException, match 'Unable to load bulk job', and halt the runbook step — retrying the same ID cannot succeed.

Prevention

When it happens

Trigger: `bin/bulk make-silent --id 999` where 999 does not exist; the job was archived or garbage-collected; the ID was copied from another environment.

Common situations: Copy-pasting IDs between test and prod; jobs pruned by GC while a runbook still referenced them; confusing bulk job IDs with worker task IDs.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/7785233f7856c7e1. Report an issue: GitHub.