- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I prompted the LLM to call the bash tool with an invalid argument, and so it specified a negative number to the timeout parameter. It caused a TimeoutNegativeWarning which leaked into and broke the TUI.
Proposed fix:
- validate the argument before passing it to setTimeout
- to guard against similar issues, we can try to capture the warning using process.on("warning", ...). In order not to lose the logs, we can cache them in the background and dump them once the TUI has quit, similar to what I do in this PR: feat: Improve logging #3305
You can assign this to me.
OpenCode version
opentui @ 087cd3e
Steps to reproduce
- Run the TUI
- Prompt: call the bash tool with a negative number
Screenshot and/or share link
 
Operating System
No response
Terminal
alacritty
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working