Last night my merge request !4466 was merged into the GitLab Language Server, the repo behind the GitLab Duo CLI. It closes issue #3312 . Here is what was wrong, how I fixed it, and what four weeks of review taught me.
The bug
Sometimes the stream for a Duo CLI turn closes before the final status update arrives. When that happened, the CLI told you to restart with --existing-session-id .
That advice was usually wrong. In most cases only the last status update was lost, after the answer had already streamed. The workflow was still alive, so you could just keep typing. Restarting resumed the same workflow and changed nothing. But the notice made it look like your session was over.
Restarting only helps in one case: when the turn is stuck waiting for a tool approval that never showed up on screen. There, sending a plain message would actually fail the workflow.
The fix
The stream alone can't tell you which case you're in, so the CLI now asks the server.…