ux: friendlier messages when stopping, invite user to continue
- SHA
35ed29b5c40df92debb3260d3872be519a0d2373- Parents
-
f3985be - Tree
c2d5388
35ed29b
35ed29b5c40df92debb3260d3872be519a0d2373f3985be
c2d5388| Status | File | + | - |
|---|---|---|---|
| M |
src/loader/agent/loop.py
|
3 | 3 |
src/loader/agent/loop.pymodified@@ -1021,12 +1021,12 @@ class Agent: | ||
| 1021 | 1021 | |
| 1022 | 1022 | # Check if we've exceeded extraction limits |
| 1023 | 1023 | if extracted_iterations > MAX_EXTRACTED_ITERATIONS: |
| 1024 | - # Model keeps outputting bracket-format calls - stop and report | |
| 1024 | + # Model keeps outputting bracket-format calls - stop and let user continue | |
| 1025 | 1025 | final_response = content |
| 1026 | 1026 | self.messages.append(Message(role=Role.ASSISTANT, content=response_content)) |
| 1027 | 1027 | await emit(AgentEvent( |
| 1028 | 1028 | type="response", |
| 1029 | - content=final_response + "\n\n(Stopping here - task appears complete.)" | |
| 1029 | + content=final_response + "\n\nLet me know if you'd like me to continue or make changes." | |
| 1030 | 1030 | )) |
| 1031 | 1031 | break |
| 1032 | 1032 | |
@@ -1126,7 +1126,7 @@ class Agent: | ||
| 1126 | 1126 | # Stop if: all tools in batch failed, or we have many consecutive errors |
| 1127 | 1127 | if batch_errors == len(tool_calls) or consecutive_errors >= 3: |
| 1128 | 1128 | # All failed or too many consecutive errors - stop trying |
| 1129 | - final_response = "I've completed what I can. Some operations encountered errors." | |
| 1129 | + final_response = "I ran into some issues. Let me know if you'd like me to try a different approach." | |
| 1130 | 1130 | await emit(AgentEvent(type="response", content=final_response)) |
| 1131 | 1131 | break |
| 1132 | 1132 | |