chenhg5/cc-connect · error
--at-users requires a value
Error message
--at-users requires a value
What it means
The --at-users flag of `cc-connect send` expects a comma-separated list of user IDs as its value. parseSendArgs returns "--at-users requires a value" when the flag has no following argument. The value is later split on commas and trimmed into the request's AtUsers list.
Source
Thrown at cmd/cc-connect/send.go:141
i++
filePaths = append(filePaths, args[i])
case "--audio":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--audio requires a path")
}
i++
audioPaths = append(audioPaths, args[i])
case "--video":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--video requires a path")
}
i++
videoPaths = append(videoPaths, args[i])
case "--stdin":
useStdin = true
case "--at-users":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--at-users requires a value")
}
i++
for _, uid := range strings.Split(args[i], ",") {
uid = strings.TrimSpace(uid)
if uid != "" {
req.AtUsers = append(req.AtUsers, uid)
}
}
case "--at-all":
req.AtAll = true
case "--data-dir":
if i+1 >= len(args) {
return req, "", fmt.Errorf("--data-dir requires a value")
}
i++
dataDir = args[i]
case "--help", "-h":
return req, "", errSendUsageView on GitHub (pinned to 4000b2338a)
Solutions
- Pass a comma-separated list: `--at-users uid1,uid2`.
- Quote the list if it contains spaces.
- If you want to mention everyone, use the boolean `--at-all` instead of a bare --at-users.
- Check that the env/variable holding the IDs is non-empty.
Example fix
// before cc-connect send --at-users --message "hi" // after cc-connect send --at-users ou_123,ou_456 --message "hi"
Defensive patterns
Strategy: validation
Validate before calling
USERS="uid1,uid2"
[ -n "$USERS" ] || { echo "at-users list empty"; exit 1; }
cc-connect send --at-users "$USERS" --message hi Prevention
- Pass a quoted comma-separated list.
- Use --at-all for mentioning everyone instead of an empty --at-users.
- Verify env/config supplying user IDs is populated.
- Trim stray newlines from the ID list.
When it happens
Trigger: `cc-connect send --at-users` with no list; `cc-connect send --at-users --at-all`; empty variable expansion leaving only the flag.
Common situations: User IDs stored in a config/env that is unset; passing IDs on separate lines without quoting; assuming --at-users is boolean like --at-all.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- unknown flag: %s
- unknown top-level command: %s
- --image requires a path
- --file requires a path
- --audio requires a path
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/f81d8c5246fe2e26.
Report an issue: GitHub.