From 17d74c67400fb7209557e509316c7c36c7df56a5 Mon Sep 17 00:00:00 2001 From: Philip Zeyliger Date: Sun, 4 Jan 2026 21:59:44 -0800 Subject: [PATCH] shelley: fix gitinfo messages incorrectly showing agent working phil: I increasingly think we should make the is-agent-working state explicit and out of band with the messages (especially since server restart can make it wrong), but haven't done that. Prompt: after "diff-shortcuts now at bc5feb56" I get the "agent is working" message, even though the turn is over. Fix that. Gitinfo messages are created when the agent makes a commit. They always happen at the end of a turn, so isEndOfTurn should return true for them. This prevents the UI from incorrectly showing "agent is working" after a gitinfo message is published. --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index ae2c65921c589824331284b5f8167017951c4924..410c780995057d0f0d19c8b30bfb5fd7576971fa 100644 --- a/server/server.go +++ b/server/server.go @@ -189,9 +189,9 @@ func isEndOfTurn(msg *generated.Message) bool { if msg.Type == string(db.MessageTypeError) { return true } - // Gitinfo messages are metadata, not part of the agent turn - ignore them + // Gitinfo messages always come at end of turn (after a commit) if msg.Type == string(db.MessageTypeGitInfo) { - return false + return true } // Only agent messages can have end_of_turn if msg.Type != string(db.MessageTypeAgent) {