yamadashy/repomix · info · OperationCancelledError
Remote config not trusted
Error message
Remote config not trusted
What it means
This OperationCancelledError is thrown when the user declines to trust the remote repository's config: they pick 'No, do not run' or cancel the clack select (Ctrl-C/Esc). Repomix prints 'Aborted: remote config was not trusted.' and aborts the remote run rather than defaulting to trust — the menu's initialValue is 'no' so even a stray Enter aborts. It is a deliberate, expected cancellation, not a malfunction.
Source
Thrown at src/cli/prompts/remoteConfigTrustPrompt.ts:304
label: "Yes, and don't ask again for this repository",
hint: 'until this repo changes its config, or your OS clears its temp dir',
},
{ value: 'no', label: 'No, do not run' },
];
const clack = await deps.loadClack();
const choice = await clack.select({
// Restate the risk and the source here: this line renders last and stays on
// screen with the options, so it survives a config that scrolled the banner away.
message: `Trust and run this config from ${sanitizeForDisplay(redactUrl(repoUrl))}? It can run arbitrary commands on your machine.`,
options: trustOptions,
// Default to the safe choice so a stray Enter never grants trust.
initialValue: 'no' satisfies RemoteTrustChoice,
});
if (clack.isCancel(choice) || choice === 'no') {
clack.cancel('Aborted: remote config was not trusted.');
throw new OperationCancelledError('Remote config not trusted');
}
if (choice === 'always') {
await deps.markRemoteConfigTrusted(repoUrl, configDigest);
}
// 'once' or 'always' → proceed
};
View on GitHub (pinned to f465ad9093)
Solutions
- If the config is legitimate, re-run and choose 'Yes, once' or "Yes, and don't ask again for this repository".
- For automation, use the trust env/flag (REPOMIX_REMOTE_TRUST_CONFIG / --remote-trust-config) after reviewing the config once, so the prompt is skipped.
- If declining was accidental, just re-run the command; nothing is persisted on decline.
- To avoid loading the remote config at all, pass `--config` pointing at a local file.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await confirmRemoteConfigTrust(options);
} catch (e) {
if (e instanceof OperationCancelledError && e.message === 'Remote config not trusted') {
console.error('User declined the remote config; aborting cleanly.');
return; // expected cancellation, not a bug
}
throw e;
} Prevention
- Review the config before choosing 'always' trust; it can run arbitrary commands.
- Avoid sending stray keystrokes/EOF to stdin of the CLI in scripts.
- Use REPOMIX_REMOTE_TRUST_CONFIG / --remote-trust-config for non-interactive runs instead of scripting answers to the prompt.
- Treat OperationCancelledError as normal control flow, not a crash.
When it happens
Trigger: During `repomix --remote <url>` with a trust-requiring config in the cloned repo: the user answers the 'Trust and run this config from <repo>?' prompt with 'No, do not run', presses Ctrl-C/Esc (clack.isCancel), or accepts the 'no' initial value with Enter.
Common situations: A developer reviews the shipped config, sees suspicious input.processors or executable (js/ts) config code, and declines; accidental Ctrl-C during the prompt; scripted runs where stdin sends an unexpected keystroke cancelling the select.
Related errors
- Refusing to trust ${configName}: the remote repository's con
- Refusing to trust ${configName}: it resolves outside the clo
- Reviewing the remote repository's config (${configName}) nee
- Skill generation cancelled
- Could not read the remote repository's config (${configName}
AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29).
Data as JSON: /api/errors/8f6badd6394290c6.
Report an issue: GitHub.