We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c081764 commit e0da466Copy full SHA for e0da466
extensions/cli/src/commands/chat.ts
@@ -446,7 +446,7 @@ async function runHeadlessMode(
446
): Promise<void> {
447
// Critical validation: Ensure we have a prompt in headless mode
448
// This prevents the CLI from hanging in TTY-less environments
449
- if (!prompt) {
+ if (!prompt && !options.prompt?.length && !options.agent) {
450
throw new Error(
451
'Headless mode requires a prompt. Use: cn -p "your prompt"\n' +
452
'Or pipe input: echo "prompt" | cn -p\n' +
0 commit comments