-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
enhancementNew feature or requestNew feature or requestsdkIssues related to the Codex SDKIssues related to the Codex SDK
Description
What feature would you like to see?
Currently, the Codex TypeScript SDK (sdk/typescript/src/thread.ts) does not provide a way to cancel or abort an active thread.run(...) operation once it has started. This creates issues in scenarios where the run may take longer than expected, hang, or needs to be stopped due to changing user input or application logic.
A native abort() or cancel() method would allow developers to gracefully stop ongoing runs, improving both control and UX for interactive applications.
Desired Behavior
Provide an API method to terminate a running operation. For example:
const thread = codex.startThread();
const run = thread.run("Generate code...");
// later:
thread.abort(); // or run.abort()
This should:
• Stop the underlying Codex process / stream
• Reject the pending promise
Additional information
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsdkIssues related to the Codex SDKIssues related to the Codex SDK