Currently, hitting Ctrl+C interrupts the model in the Rust TUI, but if you submit another message, the model is generally confused and you cannot actually continue your conversation with new instructions. I believe this is because there is almost always inevitably a tool call outstanding when this happens and when the user hits Ctrl+C, we just fail to respond.
I believe this is because we need to respond with "aborted" along the lines of:
|
return { |
|
outputText: "aborted", |
|
metadata: {}, |
|
additionalItems: [ |
|
{ |
|
type: "message", |
|
role: "user", |
|
content: [{ type: "input_text", text: note }], |
|
}, |
|
], |
|
}; |
so that the model has a response to the tool call, after which it will consider the next user message.
/cc @fouad-openai to confirm this
See also: #1245.
Currently, hitting
Ctrl+Cinterrupts the model in the Rust TUI, but if you submit another message, the model is generally confused and you cannot actually continue your conversation with new instructions. I believe this is because there is almost always inevitably a tool call outstanding when this happens and when the user hitsCtrl+C, we just fail to respond.I believe this is because we need to respond with
"aborted"along the lines of:codex/codex-cli/src/utils/agent/handle-exec-command.ts
Lines 363 to 373 in 029f39b
so that the model has a response to the tool call, after which it will consider the next user message.
/cc @fouad-openai to confirm this
See also: #1245.