diff --git a/browser_cli/client.py b/browser_cli/client.py index 38f4b2d..906da10 100644 --- a/browser_cli/client.py +++ b/browser_cli/client.py @@ -315,8 +315,9 @@ def send_command(command: str, args: dict | None = None, profile: str | None = N if private_key is None and resolved_token: msg["token"] = resolved_token route_profile = requested_profile - if not route_profile and command != "browser-cli.targets": - route_profile = _auto_route_remote(remote_endpoint, resolved_token, key=private_key) + _no_route_commands = {"browser-cli.targets", "browser-cli.auth.keys", "browser-cli.auth.trust"} + if not route_profile and command not in _no_route_commands: + route_profile = _auto_route_remote(remote_endpoint, resolved_token, key=key_spec) if route_profile: msg["_route"] = route_profile else: