Commit 4fdddf1
committed
fix(orchestrator): send sliced messages in delta mode (not just tool results)
**Problem:**
Previous fix removed hasToolResults check from slicing but left it in message
selection logic. This caused "at least one message required" error because SAM
sent ONLY tool results (no conversation messages) when statefulMarker existed.
**Root Cause:**
Two separate checks for hasToolResults:
1. Line 4284: Message slicing (FIXED in previous commit)
2. Line 4320: Message selection for delta mode (NOT FIXED - this commit)
When statefulMarker existed without hasToolResults, messages were sliced correctly
but then ONLY internalMessages (tool results) were sent, no messagesToSend!
**Solution:**
1. Removed hasToolResults check from message selection (line 4320)
2. When statefulMarker exists, send BOTH:
- Sliced conversation messages (messagesToSend)
- Internal messages (tool calls + results)
3. This creates complete delta: new conversation context + tool results
**Testing:**
✅ Build: PASS
Next: Test with Claude conversation
**Related:** Previous commit 29a49411 parent 29a4941 commit 4fdddf1
1 file changed
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4310 | 4310 | | |
4311 | 4311 | | |
4312 | 4312 | | |
4313 | | - | |
| 4313 | + | |
4314 | 4314 | | |
4315 | | - | |
4316 | | - | |
| 4315 | + | |
| 4316 | + | |
| 4317 | + | |
4317 | 4318 | | |
4318 | 4319 | | |
4319 | 4320 | | |
4320 | | - | |
4321 | | - | |
| 4321 | + | |
| 4322 | + | |
4322 | 4323 | | |
4323 | | - | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
4324 | 4341 | | |
4325 | | - | |
| 4342 | + | |
4326 | 4343 | | |
4327 | 4344 | | |
4328 | 4345 | | |
| |||
0 commit comments