{"record":{"id":"2ab3d0d44ae08c47","repo":"phacility/phabricator","slug":"specify-s-to-reset-all-action-counters","errorCode":null,"errorMessage":"Specify %s to reset all action counters.","messagePattern":"Specify (.+?) to reset all action counters\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php","lineNumber":52,"sourceCode":"    }\n\n    $user = id(new PhabricatorPeopleQuery())\n      ->setViewer($this->getViewer())\n      ->withUsernames(array($username))\n      ->executeOne();\n    if (!$user) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'No user exists with username \"%s\".',\n          $username));\n    }\n\n    $all = $args->getArg('all');\n    if (!$all) {\n      // TODO: Eventually, let users reset specific actions. For now, we\n      // require `--all` so that usage won't change when you can reset in a\n      // more tailored way.\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify %s to reset all action counters.', '--all'));\n    }\n\n    $count = PhabricatorSystemActionEngine::resetActions(\n      array(\n        $user->getPHID(),\n      ));\n\n    echo pht('Reset %s action(s).', new PhutilNumber($count)).\"\\n\";\n\n    return 0;\n  }\n\n}\n","sourceCodeStart":34,"sourceCodeEnd":68,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php#L34-L68","documentation":"Thrown by `bin/auth unlimit` when `--all` is not passed. The workflow currently only supports resetting every action counter for the chosen user, and requires `--all` explicitly (per the in-code TODO) so that the command's semantics stay stable when more tailored resets are added later. It is a usage guard, not a runtime failure.","triggerScenarios":"Running `bin/auth unlimit --user alice` without `--all`; passing a misspelled flag such as `--everything` or `-a` which PhutilArgumentParser does not bind to the 'all' argument.","commonSituations":"The admin expects `--user` alone to be sufficient; older internal runbooks document the pre-`--all` invocation; script uses a short flag that the parser silently treats as unknown.","solutions":["Add the required flag: `bin/auth unlimit --user <username> --all`.","Consult `bin/auth help unlimit` for the exact flag names before scripting.","If you meant to reset only specific actions, note that is not yet supported — `--all` is the only mode."],"exampleFix":"// before\n$ bin/auth unlimit --user alice\nSpecify --all to reset all action counters.\n\n// after\n$ bin/auth unlimit --user alice --all","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember `--all` is mandatory by design; there is no narrower reset yet.","Pin the full command (`bin/auth unlimit --user X --all`) in scripts and runbooks so the flag is never omitted.","Check `bin/auth help unlimit` after Phabricator upgrades in case flags change."],"tags":["phabricator","cli","usage-exception","missing-argument","rate-limiting"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}