fix(hotel_receptionist): give the room-booking flow an exit when no card is taken - #7177
Open
u9g wants to merge 1 commit into
Open
fix(hotel_receptionist): give the room-booking flow an exit when no card is taken#7177u9g wants to merge 1 commit into
u9g wants to merge 1 commit into
Conversation
…ard is taken GetCardTask completing with decline_card_capture used to surface to BookRoom as a bare error while its last directive was still "call open_credit_card_dialog", so the model reopened the card dialog and the re-ask loop moved up a level.
chenghao-mou
approved these changes
Sep 8, 2026
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
Stacked on #6803. That PR lets
GetCardTaskend without a card viadecline_card_capture, which completes the task with aToolError. On the new-booking pathBookRoomTask.open_credit_card_dialogawaited the task without catching it, so the error reached BookRoom's LLM as a bare "couldn't get the card details" while its last directive was still "next: call open_credit_card_dialog". The model reopened the card dialog, and the re-ask loop #6803 removes from the sub-task moved up one level.open_credit_card_dialogcatches theToolErrorand returns a directive: the booking can't be finalized without a card, offer to finish by callback, callgive_upgive_up's docstring widens to cover "no card could be taken" so the model has a named exitThe card-update path (
start_card_update) already handles the error through the receptionist's own instructions and is unchanged.Testing
pytest examples/hotel_receptionist/ tests/test_tools.py --allow-uncategorized(114 passed)ruff format --checkandruff checkclean🤖 Generated with Claude Code