![]() This PR addresses the behavior of the agent's terminal tool when the executed command is interrupted or fails after producing some output. Currently, if the command doesn't finish successfully, any partial output captured before the interruption/failure is discarded, and only an error message (or a generic cancellation message) is returned to the LLM. This change modifies the `run_command_limited` function in the terminal tool to catch errors when awaiting the command's status (which includes interruptions). In the case of such an error, it now includes any partial stdout/stderr captured up to that point within the error message returned to the `ToolUseState`. This ensures the LLM receives the partial context even when the command doesn't complete cleanly, framed appropriately as part of an error/interruption message. Closes #29101 Release Notes: - N/A |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |