Skip to content

Server chats: Stop works on a kept Claude Code process, Send stays while it works - #547

Open
MopigamesYT wants to merge 2 commits into
devfrom
fix/545-remote-follow-ups
Open

MopigamesYT wants to merge 2 commits into
devfrom
fix/545-remote-follow-ups

Conversation

@MopigamesYT

@MopigamesYT MopigamesYT commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #545

What changed

  • Stop deadlock (server): on a chat's second and later turns, which reuse the Claude Code process kept from the turn before, claudeProcess.end waited for the process to be reported done, while the output reader was blocked handing a line to the turn that had already returned. The reader was only released after done, so the run never ended. The chat stayed "working", and every message sent afterwards waited in chat.steer for a turn that would never take it. end now lets the reader drain the output (stopReading) before waiting.
  • Send hidden (desktop): remoteDesktop.syncRun hid Send while a server chat worked and never showed Steer, so only Stop was left. Send and Steer now show as for this computer's chats.
  • Timeout: a follow-up with files waits 3 minutes instead of 15 s (the server may copy them to an SSH machine for up to 2 minutes).
  • Tests: TestBusyClaudeTakesMessagesAndStop (fake claude: a follow-up sent mid-turn reaches it and is answered; Stop on the next turn ends the run, which hung before the fix) and TestFollowUpMessages.

Reported symptom: while the agent works, only Stop shows, Enter does nothing, Stop does nothing; the reporter had to restart the server's VM.

Screenshots

Visible change (Send and Steer while a server chat works): before/after screenshots still have to be attached (no desktop build here).

Checked here: go test ./internal/agent ./internal/server, GOOS=js go vet ./internal/ui. Not run here: the internal/ui tests and the desktop build (no C compiler or X11/GL headers); CI runs them.

Assisted-by: Claude Opus 5.5 medium

🤖 Generated with Claude Code

MopigamesYT and others added 2 commits November 18, 2026 10:29
The desktop gave up on /api/send after 15 s, while the server may spend
up to 2 minutes copying the attached files to an SSH machine's project
before it answers: the client reported a failure (in a status line that
was overwritten within a second, see #546) although the message could
still arrive. With files the client now waits 3 minutes.

TestFollowUpMessages checks that follow-ups to an existing chat, with
and without a file, join it on the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ile it works (#545)

While a server chat worked there was no way to reach it:

- Stop deadlocked on a chat's second turn and later ones, which reuse
  the Claude Code process kept from the turn before. end() waited for
  the process to be reported done, but the output reader was blocked
  handing a line to the turn that had already returned, and it is only
  released (quit) after done. The run never ended, so the chat stayed
  "working", and every message sent afterwards went to chat.steer for
  a turn that would never take it. end() now lets the reader drain the
  output (stopReading) before it waits.
- The desktop hid Send while a server chat worked and never showed
  Steer: only Stop was left. Send and Steer now show as for this
  computer's chats; the server already takes a message sent mid-turn
  and gives it to the agent at its next step.

Test: TestBusyClaudeTakesMessagesAndStop (fake claude: a follow-up
sent mid-turn reaches it and is answered; Stop on the next turn ends
the run; before the fix it hung).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MopigamesYT MopigamesYT changed the title Remote: a follow-up with files no longer times out on the client Server chats: Stop works on a kept Claude Code process, Send stays while it works Nov 18, 2026
@MopigamesYT

Copy link
Copy Markdown
Member Author

Checked on the reporter's server (DietPi, build 229ef57): a message sent while the agent works reaches it, and Stop ends a running Claude Code turn.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants