{"record":{"id":"97263bd049e63efd","repo":"phacility/phabricator","slug":"work-has-already-started-on-job-s-jobs-can-not","errorCode":null,"errorMessage":"Work has already started on job \"%s\". Jobs can not be reconfigured after they have been started.","messagePattern":"Work has already started on job \"(.+?)\"\\. Jobs can not be reconfigured after they have been started\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/bulk/management/PhabricatorBulkManagementMakeSilentWorkflow.php","lineNumber":52,"sourceCode":"      ->setViewer($viewer)\n      ->withIDs(array($id))\n      ->executeOne();\n    if (!$job) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Unable to load bulk job with ID \"%s\".',\n          $id));\n    }\n\n    if ($job->getIsSilent()) {\n      echo tsprintf(\n        \"%s\\n\",\n        pht('This job is already configured to run silently.'));\n      return 0;\n    }\n\n    if ($job->getStatus() !== PhabricatorWorkerBulkJob::STATUS_CONFIRM) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Work has already started on job \"%s\". Jobs can not be '.\n          'reconfigured after they have been started.',\n          $id));\n    }\n\n    $job\n      ->setIsSilent(true)\n      ->save();\n\n    echo tsprintf(\n      \"%s\\n\",\n      pht(\n        'Configured job \"%s\" to run silently.',\n        $id));\n\n    return 0;\n  }","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/management/PhabricatorBulkManagementMakeSilentWorkflow.php#L34-L70","documentation":"Bulk jobs can only be reconfigured while awaiting confirmation (STATUS_CONFIRM); once work starts, the mail/notification settings are frozen. The workflow first returns success if the job is already silent (getIsSilent), then rejects any status other than confirm with this exception. This prevents changing notification behavior mid-run, which subscribers could observe as inconsistent.","triggerScenarios":"Calling make-silent on a job that is already running, waiting, or complete; racing the daemon workers that pick the job up right after it was confirmed.","commonSituations":"An operator notices a loud bulk edit only after approving it; automation that tries to silence jobs after the fact.","solutions":["Silence the job before confirming it in the UI — that confirmation window is the only opportunity.","If work already started, let it finish and send a follow-up notice; the setting cannot be changed retroactively.","For future jobs, have the actor be a bot account or disable mail globally so notifications are naturally suppressed."],"exampleFix":"# wrong order: confirm first, then try to silence\nbin/bulk make-silent --id 123   # fails: work already started\n# right order: silence while the job still awaits confirmation\nbin/bulk make-silent --id 123   # then confirm the job in the web UI","handlingStrategy":"validation","validationCode":"# only attempt to silence jobs still awaiting confirmation\nstatus=$(get_bulk_job_status \"$JOB_ID\")\nif [[ \"$status\" != \"confirm\" ]]; then\n  echo \"job $JOB_ID is '$status'; can only be silenced while awaiting confirmation\" >&2; exit 2\nfi","typeGuard":"// inside Phabricator tooling\nfunction isSilenceable(PhabricatorWorkerBulkJob $job) {\n  return $job->getStatus() === PhabricatorWorkerBulkJob::STATUS_CONFIRM\n    && !$job->getIsSilent();\n}","tryCatchPattern":"Catch PhutilArgumentUsageException, match 'Work has already started', and treat it as a process signal: the silence window was missed, escalate to the operator instead of retrying.","preventionTips":["Silence bulk jobs before confirming them in the UI.","Use bot actors or global mail disabling for predictable notification behavior.","Monitor newly confirmed jobs if silent-running matters to your workflow."],"tags":["phabricator","cli","bulk-jobs","state-machine"],"backgroundTag":"invalid-state-transition","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}