Description
Root cause: the response has already arrived in Chrome, but background tabs stop rendering because of Chrome's battery optimization mechanism.
Steps to Reproduce
Reproduction Steps
- Run the following command twice:
opencli gemini ask "hello, return 114" --window foreground -f json
- Alternatively, switch between ChatGPT and Gemini requests:
opencli chatgpt ask "hello, return 114" --window foreground -f json
Then run Gemini again.
- Observe the timeout error.
Example
[uzqw@uzqw-lenovo25 opencli]$ opencli gemini ask "hello, return 114" --window foreground -f json
[
{
"response": "💬 [NO RESPONSE] No Gemini response within 60s."
}
]
[uzqw@uzqw-lenovo25 opencli]$ opencli gemini ask "hello, return 115" --window foreground -f json
[
{
"response": "💬 [NO RESPONSE] No Gemini response within 60s."
}
]
Expected Behavior
If the network is functioning normally, this request should not time out. The timeout appears to be caused by Chrome's battery optimization behavior.
If I manually click the tab and keep it in the foreground, opencli does not time out. However, when opencli is controlled by another program and the tab stays in the background, timeouts occur much more frequently.
Also, --window foreground does not fully work, because it only activates the tab during the initial launch.
OpenCLI Version
1.8.3
Node.js Version
22.x
Operating System
Linux
Logs / Screenshots
Description
Root cause: the response has already arrived in Chrome, but background tabs stop rendering because of Chrome's battery optimization mechanism.
Steps to Reproduce
Reproduction Steps
opencli gemini ask "hello, return 114" --window foreground -f jsonopencli chatgpt ask "hello, return 114" --window foreground -f jsonThen run Gemini again.
Example
Expected Behavior
If the network is functioning normally, this request should not time out. The timeout appears to be caused by Chrome's battery optimization behavior.
If I manually click the tab and keep it in the foreground,
openclidoes not time out. However, whenopencliis controlled by another program and the tab stays in the background, timeouts occur much more frequently.Also,
--window foregrounddoes not fully work, because it only activates the tab during the initial launch.OpenCLI Version
1.8.3
Node.js Version
22.x
Operating System
Linux
Logs / Screenshots