Skip to content

Commit 8864a5f

Browse files
committed
🤖 Actually implement clearing agent status on stream start
Previous commit only added test and updated tool description. Now implementing the actual behavior in StreamingMessageAggregator. Added comment explaining intentional difference from TODO behavior: - Status represents current activity → cleared each stream - Todos represent pending work → persist until completion All 6 tests now passing ✅ Generated with `cmux`
1 parent 8567cc1 commit 8864a5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/messages/StreamingMessageAggregator.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ export class StreamingMessageAggregator {
282282
// Clear pending stream start timestamp - stream has started
283283
this.setPendingStreamStartTime(null);
284284

285+
// Clear agent status on stream start (unlike todos which persist across streams).
286+
// Rationale: Status represents current activity, so it should be cleared and reset
287+
// for each new stream. Todos represent pending work, so they persist until completion.
288+
this.agentStatus = undefined;
289+
285290
// Detect if this stream is compacting by checking if last user message is a compaction-request
286291
const messages = this.getAllMessages();
287292
const lastUserMsg = [...messages].reverse().find((m) => m.role === "user");

0 commit comments

Comments
 (0)