taskless auth (the status path) declares -d, --dir, but passing it with a separate value fails:
$ taskless auth -d .
Unknown command `.`
$ taskless auth --dir=.
Logged in as … (…)
Reproduced on 0.12.0-next-0fb5221 (built from main plus #422, which does not touch auth). auth login -d <dir> works, because login is found first and the value never reaches the parent's resolution.
Cause
citty resolves a subcommand from the first raw argument that does not start with -. In auth -d . that argument is ., the flag's value, and . is neither login nor logout, so citty reports an unknown command before auth's own run is reached. --dir=. works only because the value stays inside the flag token.
auth's run has the same assumption. Its "was a subcommand given?" guard (packages/cli/src/commands/auth.ts, rawArgs.some((argument) => !argument.startsWith("-"))) would also read a flag value as a subcommand. So fixing only the citty side would turn the error into silently printing nothing.
Why it matters
auth login state is stored per project (.taskless/.env.local.json), so -d is the natural way to check whether another checkout is logged in. That was the use it failed on here.
Possible fix
agent.ts and check.ts already skip flag values when scanning rawArgs for positionals. The same scanner, or declaring the status path as a subcommand, would cover both halves.
taskless auth(the status path) declares-d, --dir, but passing it with a separate value fails:Reproduced on
0.12.0-next-0fb5221(built frommainplus #422, which does not touchauth).auth login -d <dir>works, becauseloginis found first and the value never reaches the parent's resolution.Cause
citty resolves a subcommand from the first raw argument that does not start with
-. Inauth -d .that argument is., the flag's value, and.is neitherloginnorlogout, so citty reports an unknown command beforeauth's ownrunis reached.--dir=.works only because the value stays inside the flag token.auth'srunhas the same assumption. Its "was a subcommand given?" guard (packages/cli/src/commands/auth.ts,rawArgs.some((argument) => !argument.startsWith("-"))) would also read a flag value as a subcommand. So fixing only the citty side would turn the error into silently printing nothing.Why it matters
authlogin state is stored per project (.taskless/.env.local.json), so-dis the natural way to check whether another checkout is logged in. That was the use it failed on here.Possible fix
agent.tsandcheck.tsalready skip flag values when scanningrawArgsfor positionals. The same scanner, or declaring the status path as a subcommand, would cover both halves.