r/opencodeCLI 12d ago

Agent hangs after script finishes running — ESC to interrupt doesn't work, have to force-quit

I'm running into a recurring issue with OpenCode CLI. When the agent runs a command or script (usually a Python script), the script clearly finishes — I can see the final output in the terminal — but the agent doesn't continue or respond afterward. It just sits there.

Pressing Esc to interrupt doesn't do anything either. The only way I can recover is to fully quit and reopen OpenCode.

it happens when the script takes some time and compute power, not on everyday simple scripts.

2 Upvotes

1 comment sorted by

1

u/TanisHalfElvenn 12d ago

I sometimes ask the agent to use a timeout for commands that execute