Fix empty tool-use response handling - #522
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
learn-claude-code | 168fff8 | Aug 14 2026, 04:04 PM |
Bill-Billion
marked this pull request as ready for review
August 15, 2026 09:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool_useblocks as the execution signal across the current Agent LoopsContext
The current course still inherited the boundary reported in #224: a compatible provider can return
stop_reason="tool_use"without an actual tool call. The loop would append an empty user turn and request the model again. This PR fixes the current S01-S15 course structure rather than changing the frozenagents/s04_subagent.py.Reported by @miketam in #224.
Verification
pytest -q tests/test_agent_loop_boundaries.py tests/test_agent_teams_runtime.py tests/test_compaction_tool_pairs.py tests/test_background_tasks.py-> 116 passed, 75 subtests passedpytest -q -k "not test_s16_scenario_matches_the_deterministic_runtime"-> 206 passed, 1 deselected, 84 subtests passedmainxmllintand match their Web asset mirrorsgit diff --checkpasses