fix: 🐛 More fixes

This commit is contained in:
Shawn Smith 2025-11-11 19:39:07 -08:00
parent 82768aefc2
commit a39b2db833

View file

@ -444,16 +444,6 @@ async function runHeadlessMode(
prompt: string | undefined,
options: ChatOptions,
): Promise<void> {
// Critical validation: Ensure we have a prompt in headless mode
// This prevents the CLI from hanging in TTY-less environments
if (!prompt && !options.prompt?.length) {
throw new Error(
'Headless mode requires a prompt. Use: cn -p "your prompt"\n' +
'Or pipe input: echo "prompt" | cn -p\n' +
"Or use agent files: cn -p --agent my-org/my-agent",
);
}
// Initialize services for headless mode
const { permissionOverrides } = processCommandFlags(options);