Panniantong/Agent-Reach · info · SystemExit
Configure input cancelled
Error message
Configure input cancelled
What it means
When `agent-reach configure <key>` is run with no positional value and stdin is a TTY, the CLI prompts for the value with getpass (hidden input). EOF (Ctrl-D) or Ctrl-C at that prompt prints 'Configure input cancelled' to stderr and exits 1; nothing is written to the config.
Source
Thrown at agent_reach/cli.py:1373
"prompt or use --stdin.",
file=sys.stderr,
)
return " ".join(values)
try:
interactive = bool(sys.stdin.isatty())
except (AttributeError, OSError):
interactive = False
if not interactive:
return ""
import getpass
try:
return getpass.getpass(f"Value for {args.key}: ")
except (EOFError, KeyboardInterrupt):
print("Configure input cancelled", file=sys.stderr)
raise SystemExit(1) from None
def _cmd_configure(args):
"""Set a config value and test it, or auto-extract from browser."""
import shutil
from typing import cast
from agent_reach.config import Config
config = Config()
# ── Auto-extract from browser ──
if args.from_browser:
from agent_reach.cookie_extract import configure_from_browser
browser = args.from_browser
platform = "xhs" if args.platform == "xiaohongshu" else args.platform
print(f"Extracting {args.platform} cookies from {browser}...")View on GitHub (pinned to 93ae1d18c3)
Solutions
- Simply re-run the command and paste the value at the prompt, then press Enter
- Prefer non-interactive input for automation: agent-reach configure <key> --stdin < file
- Note that hidden prompts show no typed characters by design — type the value blind and press Enter
- Check your SSH/session health if EOFs happen spontaneously
Defensive patterns
Strategy: try-catch
Try / catch
# This exits the CLI process (SystemExit 1); handle it at the shell/orchestrator level: # agent-reach configure twitter-cookies || echo "cancelled or failed; nothing saved" >&2 # In expect-style automation, feed the prompt instead of letting it EOF: import subprocess r = subprocess.run(["agent-reach", "configure", "twitter-cookies"], input="<token> <ct0>\n", text=True)
Prevention
- Use --stdin with piped input in automation instead of driving the hidden prompt
- Remember getpass shows no echo; type the value fully and press Enter
- An exit-1 after Ctrl-C here is clean cancellation — nothing was written, just re-run
When it happens
Trigger: Interactive `agent-reach configure twitter-cookies` followed by Ctrl-D or Ctrl-C at the 'Value for twitter-cookies:' prompt; also when a TTY-attached run is interrupted (e.g. user realizes they are in the wrong terminal).
Common situations: Users pressing Ctrl-C out of habit at hidden prompts (no feedback characters are shown); SSH sessions dropping mid-prompt producing EOF; running configure inside a wrapper that sends EOF.
Related errors
- Could not read configure value from stdin
- Configure value exceeds the 1 MiB safety limit
- No cookies found. Make sure you're logged into the platforms
- Missing value for {args.key}
- [X] Could not find auth_token and ct0 in your input.
AI-assisted analysis of Panniantong/Agent-Reach@93ae1d18c3 (2026-08-14).
Data as JSON: /api/errors/a4045f22cfd24ac7.
Report an issue: GitHub.