phacility/phabricator · error · PhutilArgumentUsageException

Specify %s to reset all action counters.

Error message

Specify %s to reset all action counters.

What it means

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.

Source

Thrown at src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php:52

    }

    $user = id(new PhabricatorPeopleQuery())
      ->setViewer($this->getViewer())
      ->withUsernames(array($username))
      ->executeOne();
    if (!$user) {
      throw new PhutilArgumentUsageException(
        pht(
          'No user exists with username "%s".',
          $username));
    }

    $all = $args->getArg('all');
    if (!$all) {
      // TODO: Eventually, let users reset specific actions. For now, we
      // require `--all` so that usage won't change when you can reset in a
      // more tailored way.
      throw new PhutilArgumentUsageException(
        pht(
          'Specify %s to reset all action counters.', '--all'));
    }

    $count = PhabricatorSystemActionEngine::resetActions(
      array(
        $user->getPHID(),
      ));

    echo pht('Reset %s action(s).', new PhutilNumber($count))."\n";

    return 0;
  }

}

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Add the required flag: `bin/auth unlimit --user <username> --all`.
  2. Consult `bin/auth help unlimit` for the exact flag names before scripting.
  3. If you meant to reset only specific actions, note that is not yet supported — `--all` is the only mode.

Example fix

// before
$ bin/auth unlimit --user alice
Specify --all to reset all action counters.

// after
$ bin/auth unlimit --user alice --all
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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