Skip to content

"terminated command after exceeding timeout" message does not work on all programs #27818

@divinity76

Description

@divinity76

Description

When a command timeouts and gets terminated, we're supposed to get a indicator in the form of

<shell_metadata>
shell tool terminated command after exceeding timeout 120000 ms. If this command is expected to take longer and is not waiting for interactive input, retry with a larger timeout value in milliseconds.
</shell_metadata>

But that message does not always appear, presumably depending on the terminal output of the program that was terminated.

Interestingly, it seems to always appear in the /share log, but not in the terminal.

Plugins

No response

OpenCode version

1.15.0

Steps to reproduce

printf '#!/bin/sh\nopencode' | sudo tee /usr/local/bin/ccc; sudo chmod a+x /usr/local/bin/ccc; opencode --prompt 'what is the local ccc command?'

Note: It only reproduce if the llm actually try to invoke the ccc command. With that query, there's a high likelyhood of GPT* models trying to invoke it with ccc --help

Screenshot and/or share link

Screenshot showcasing the issue:
Image
/share log from the same session, showing that the issue is not present in the /share log:
https://opncd.ai/share/pUy2gPAj

Operating System

Windows 11 > WSL > Ubuntu24.04

Terminal

Reproduce on both "Windows 11 Terminal > wsl > /bin/bash" and "Wslg > xfce4-terminal > /bin/bash"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions