yamadashy/repomix · error · RepomixError
Reviewing the remote repository's config (${configName}) nee
Error message
Reviewing the remote repository's config (${configName}) needs an interactive prompt, but ${reason}.
Re-run without --stdout or output redirection to review it, or pass --force to skip the prompt (you accept running the remote config). What it means
When reviewing a remote repository's config requires the interactive @clack/prompts menu, Repomix checks two conditions: --stdout mode (the packed output shares stdout with the invisible prompt) and isPromptRenderable() (stdout is not a TTY, so the menu would render nowhere). If either is true, it throws instead of silently trusting or hanging on an unseen keypress. The message states the exact reason and the two remedies: re-run on a real terminal without --stdout/redirection, or pass --force to accept the remote config without review.
Source
Thrown at src/cli/prompts/remoteConfigTrustPrompt.ts:217
// Pin the raw bytes, not the decoded text. Decoding as UTF-8 maps every invalid
// sequence to U+FFFD, so two different files can decode to the same string; a repo
// could then swap in a config the user never approved and still match the stored
// digest. Code configs are loaded from bytes by jiti, so the bytes are what runs.
const configDigest = sha256(configBytes);
const configText = configBytes.toString('utf8');
// Already trusted for this exact config content.
if (await deps.isRemoteConfigTrusted(repoUrl, configDigest)) return;
// The menu renders on stdout. Under --stdout the packed output goes there too and
// the two collide; if stdout is redirected or piped the menu is invisible and we
// would block on a keypress nobody can see. Refuse in both cases rather than
// silently trusting, corrupting the output, or hanging.
if (stdout || !deps.isPromptRenderable()) {
const reason = stdout
? 'the packed output is being written to stdout, which would collide with it'
: 'stdout is not a terminal, so the prompt would be invisible';
throw new RepomixError(
`Reviewing the remote repository's config (${configName}) needs an interactive prompt, but ${reason}.\n` +
' Re-run without --stdout or output redirection to review it, or pass --force to skip the prompt (you accept running the remote config).',
);
}
// Ask the loader, not a second copy of the extension list: this decides whether
// the user is warned that the config executes, so it must not drift from what
// actually gets handed to jiti.
const isCode = isExecutableConfigPath(configName);
// Bound the work before escaping. The config is attacker-controlled, so a padded
// multi-MB file would otherwise force a full-file regex pass and a full-size copy
// to print at most 8 KB. Cutting the raw text to MAX_DISPLAY_BYTES UTF-16 units is
// a safe superset of what can ever be shown: escaping maps each character to at
// least itself, so the printed bytes can only come from an equally short prefix.
// Past that length the output is certainly truncated, whatever the caps decide.
const overWindow = configText.length > MAX_DISPLAY_BYTES;
const windowText = overWindow ? configText.slice(0, MAX_DISPLAY_BYTES) : configText;
View on GitHub (pinned to f465ad9093)
Solutions
- Re-run without `--stdout` and without redirecting stdout, then answer the prompt interactively.
- If you accept the remote config without review, add `--force` to skip the prompt deliberately.
- Pre-trust the config so no prompt is needed: run once interactively and choose "Yes, and don't ask again".
- Use `--config` with a local file so the remote config is never loaded.
Example fix
# before npx repomix --remote user/repo --remote-trust-config --stdout > packed.txt # after (either) npx repomix --remote user/repo --remote-trust-config --force > packed.txt # or run interactively first (choose trust), then: npx repomix --remote user/repo --remote-trust-config --stdout > packed.txt
Defensive patterns
Strategy: validation
Validate before calling
const canPrompt = process.stdin.isTTY && process.stderr.isTTY && process.stdout.isTTY && !useStdoutFlag;
if (!canPrompt && !force) {
console.error('Trust prompt cannot render: run on a TTY without --stdout/redirection, or pass --force.');
process.exit(2);
} Try / catch
try {
await runRemote();
} catch (e) {
if (e instanceof RepomixError && e.message.includes('needs an interactive prompt')) {
console.error('Re-run interactively or add --force / pre-trust the repo.');
} else throw e;
} Prevention
- Don't combine --remote-trust-config with --stdout or `>` redirection on first runs.
- Pre-trust repos interactively once, or set REPOMIX_REMOTE_TRUST_CONFIG for automations.
- In CI, don't rely on prompts; use --force or pre-trusted state explicitly.
- Check process.stdout.isTTY in wrappers before invoking interactive flows.
When it happens
Trigger: Running `repomix --remote <url> --remote-trust-config` (or answering the trust flow) in interactive mode (stdin+stderr are TTYs, config not already trusted, no explicit --config, no --force) while (a) `--stdout` is passed, or (b) stdout is redirected to a file/pipe (e.g. `repomix --remote ... > out.txt`, CI capture), so the clack select menu could not be displayed.
Common situations: Piping output to a pager or formatter while still expecting the trust prompt; CI systems that allocate a TTY for stdin but capture stdout; shell redirection in a wrapper script; writing output to a file with `>` on a first-time remote run.
Related errors
- Remote config not trusted
- Skill generation cancelled
- --skill-output can only be used with --skill-generate
- --force can only be used with --skill-generate
- --skill-project-name can only be used with --skill-generate
AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29).
Data as JSON: /api/errors/f60356ece135618e.
Report an issue: GitHub.