When finalizeStreamingToolCall returns null (malformed/incomplete args from
LLM), the existing partial ToolUse block was promoted to non-partial while
retaining stale nativeArgs from partial parsing. The partial parser for
write_to_file used OR logic (path || content), allowing nativeArgs to be
set with only path present. This bypassed the safety check in
presentAssistantMessage that guards against missing nativeArgs.
Two fixes applied:
1. Clear nativeArgs when promoting failed finalization blocks to complete
in Task.ts (both finalization paths). This ensures the safety check
in presentAssistantMessage properly catches invalid tool calls.
2. Tighten partial write_to_file nativeArgs in NativeToolCallParser to
require both path AND content (handlePartial reads from params, not
nativeArgs, so this is safe).
Closes#12079
feat(bedrock): add Cohere Embed v4 model and improve credential handling
- Add cohere.embed-v4:0 (1536-dim) to Bedrock embedding model profiles
- Add v4-specific request format (embedding_types: ["float"]) and response
parsing (embeddings.float[0]) in BedrockEmbedder
- Replace fromEnv() with fromNodeProviderChain() for default credential
chain when no AWS profile is specified, supporting SSO, IMDS, ECS, and
other credential sources with built-in memoization
- Add unit tests for Cohere v4 request/response handling, credential
provider selection, and v3 regression coverage
Fixes#11823
feat(cli): add create-with-session-id support
rename public task id flag to --create-with-session-id
validate session ids as UUIDs for create/resume and stdin start.taskId
add integration coverage for create+resume loading correct session
* Allow selecting a specific shell
Add --terminal-shell CLI flag to specify which shell ExecaTerminalProcess
uses for inline command execution. The shell path is validated at the CLI
layer and passed through the standard settings mechanism (BaseTerminal
static getter/setter), matching how all other CLI terminal settings flow
through the system.
* test(cli): make shell path access test cross-platform
In CLI runtime, stdin harnesses expect command lifetime to be governed
solely by commandExecutionTimeout (user setting), not model-provided
background timeouts. Extract resolveAgentTimeoutMs() and return 0 when
ROO_CLI_RUNTIME=1.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
feat(cli): support images in stdin stream start and message commands
Add optional `images` field (array of base64 data URIs) to the `start` and
`message` CLI stdin stream commands, allowing callers to attach images to
prompts. The images are validated, forwarded through the extension host, and
included in queued messages.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Propagate the command exit code through the JSON event emitter so CLI
consumers can distinguish between successful and failed command
executions without parsing output text.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>