fix(coding-agent/modes): added checks to skip writing error messages to
- Added checks to skip writing error messages to stderr when stopReason is 'error' or 'aborted', as these cases already handle error output separately. - This prevents duplicate error reporting in print mode when the assistant encounters terminal error conditions.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Anthropic tool schemas that used tuple-style arrays by stripping unsupported `maxItems` and only preserving provider-supported `minItems` values
|
||||
- Fixed Anthropic and OpenRouter Anthropic tool calls that previously failed with `compiled grammar is too large` by retrying automatically without strict tool schemas and reusing non-strict mode for subsequent requests in the same provider session
|
||||
- Fixed parsing of JSON tool arguments containing raw control characters inside string values (such as embedded newlines) by escaping them before JSON parsing
|
||||
- Fixed `validateToolArguments` to accept stringified objects and arrays that include literal control characters inside string fields
|
||||
|
||||
@@ -161,7 +161,11 @@ export async function runPrintMode(session: AgentSession, options: PrintModeOpti
|
||||
}
|
||||
}
|
||||
|
||||
if (assistantMsg.errorMessage) {
|
||||
if (
|
||||
assistantMsg.errorMessage &&
|
||||
assistantMsg.stopReason !== "error" &&
|
||||
assistantMsg.stopReason !== "aborted"
|
||||
) {
|
||||
process.stderr.write(`${sanitizeText(assistantMsg.errorMessage)}\n`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user