-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: headless mode surface errors and exit code 1 #7864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
// Helper function to get streaming response based on compaction state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 164-218 are not new, had to refactor out some code to satisfy eslint function complexity rule
AI Code ReviewAI review failed due to service initialization issues. Please check the Continue API key and configuration. No specific line comments generated. 💡 To request a new detailed review, comment |
ec2936c
to
8ad3506
Compare
8ad3506
to
783760d
Compare
expect(result.exitCode).toBe(1); | ||
|
||
// Should contain authentication error (not service initialization error) | ||
expect(result.stderr).toContain("authentication_error"); | ||
expect(result.stderr).toContain("invalid x-api-key"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the config still succeeds in creating but now that we're surfacing errors test now exits with 1
Description
Artificially triggered a context length error to demonstrate error message and exit code:

AI Code Review
@continue-general-review
or@continue-detailed-review
Checklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Headless CLI now surfaces errors as JSON on stdout and exits with code 1, making scripts reliable and detectable. Addresses CON-3966 by bubbling errors up instead of swallowing them.
New Features
Refactors