multica-ai/multica · error
no input
Error message
no input
What it means
In token login, when --token was not supplied the CLI prompts on stdin with a bufio.Scanner. If scanner.Scan() returns false the input stream is closed (EOF) before any line was read — there is literally no input — so it aborts with 'no input' rather than an empty-token error.
Source
Thrown at server/cmd/multica/cmd_auth.go:425
fmt.Fprintf(&b, "\nRemote SSH session detected. Before opening that URL on your local computer, forward the callback port in another terminal:\n ssh -L %d:127.0.0.1:%d <user>@<remote-host>\nThen open the URL above in your local browser.\n", port, port)
}
fmt.Fprintln(&b, "\nWaiting for authentication...")
return b.String()
}
func runAuthLoginToken(cmd *cobra.Command, providedToken string) error {
// The prompt sentinel is what pflag substitutes for `--token` with no
// value (see loginCmd init); treat it the same as an empty string so we
// fall through to the interactive prompt.
if providedToken == tokenPromptSentinel {
providedToken = ""
}
token := strings.TrimSpace(providedToken)
if token == "" {
fmt.Print("Enter your personal access token: ")
scanner := bufio.NewScanner(os.Stdin)
if !scanner.Scan() {
return fmt.Errorf("no input")
}
token = strings.TrimSpace(scanner.Text())
}
if token == "" {
return fmt.Errorf("token is required")
}
if err := validateLoginTokenPrefix(token); err != nil {
return err
}
serverURL := resolveLoginTokenServerURL(cmd)
client := cli.NewAPIClient(serverURL, "", token)
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
var me struct {
Name string `json:"name"`View on GitHub (pinned to 2c0912b6ec)
Solutions
- Always pass the token explicitly in scripts: `multica login --token mul_...`
- Pipe the token via stdin when prompts are hard: `echo "$TOKEN" | multica login`
- Run the command in a real terminal when using the interactive prompt
Example fix
# before (non-interactive, stdin closed) multica login < /dev/null # after multica login --token "$MULTICA_TOKEN"
Defensive patterns
Strategy: validation
Validate before calling
# never rely on the prompt in non-interactive contexts
[ -t 0 ] || : "${MULTICA_TOKEN:?stdin is not a TTY; pass --token}" Prevention
- Always pass --token in scripts and CI
- If piped input is needed: `printf '%s\n' "$TOKEN" | multica login`
When it happens
Trigger: Running `multica login` interactively expecting the token prompt but stdin is closed/redirected from /dev/null; piping nothing (`multica login < /dev/null`); running the command under a non-interactive scheduler with no TTY.
Common situations: Automation invoking the login command without --token; CI jobs; users hitting Enter-less EOF (Ctrl-D) at the prompt; wrappers that detach stdin.
Related errors
- could not start the local login callback server (used to rec
- failed to generate state: %w
- local server error: %w
- timed out waiting for authentication
- failed to save config: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ab695f38e324181e.
Report an issue: GitHub.