Preserve turns that exceed the tool round limit - #7
Conversation
📝 WalkthroughWalkthroughThe API now handles tool-round exhaustion as an abort condition. It records non-executed function calls with error outputs, preserves the limited turn, returns the original error, and supports continuation. Integration tests cover the 64-round scenario. ChangesTool-round limit handling
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/005-interruption.sh (1)
58-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winVerify the complete persisted abort record.
T5.6 checks only for
call_round_64. Also assert that the conversation log contains the non-execution output and the<turn_aborted>item. This prevents a transcript-invalid persistence regression from passing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/005-interruption.sh` around lines 58 - 59, Update the T5.6 assertion around the persisted conversation log to verify the complete abort record, not just call_round_64: assert that the matching JSONL transcript also contains the non-execution output and the <turn_aborted> item, preserving the existing expected successful process result.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/005-interruption.sh`:
- Around line 58-59: Update the T5.6 assertion around the persisted conversation
log to verify the complete abort record, not just call_round_64: assert that the
matching JSONL transcript also contains the non-execution output and the
<turn_aborted> item, preserving the existing expected successful process result.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3577357b-7d7b-43f2-87c0-053547b658d7
📒 Files selected for processing (3)
api.cpptests/005-interruption.shtests/mock-server.rb
Closes #5
Summary
<turn_aborted>item containing the terminal errorTesting
make test(36 tests, 0 failures)Summary by CodeRabbit
Bug Fixes
Tests