Skip to content

fix(hotel_receptionist): give card capture a no-usable-card exit - #6803

Open
u9g wants to merge 2 commits into
mainfrom
fix/get-card-no-usable-card
Open

fix(hotel_receptionist): give card capture a no-usable-card exit#6803
u9g wants to merge 2 commits into
mainfrom
fix/get-card-no-usable-card

Conversation

@u9g

@u9g u9g commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

A caller whose only card is expired had no way out of GetCardTask. The expired-date ToolError told the agent to ask for another card, and decline_card_capture was documented as refusal-only, so the agent kept re-asking a caller who had already said they had nothing else to give.

Three changes route that dead end to the existing exit, kept to what the sub-task can actually observe:

  • task instructions: if the caller refuses, or has no other card after theirs came back expired, don't keep asking - call decline_card_capture with the reason
  • the expired-date ToolError first asks to confirm the date (a past date in voice is usually a misheard year), and names decline_card_capture only if the card really is expired and there's no other card
  • decline_card_capture's docstring widens from "the caller explicitly refuses" to also cover the expired-with-no-other-card case

The sub-task does not speak any reassurance about the booking: it is also opened for a new booking that isn't written yet, so "the booking stays held" would be false there. The caller-facing script for the card-update path stays where it already lives, in the receptionist's instructions.

Follow-up: #7177 (stacked) gives BookRoomTask a directive when the capture ends without a card, so the loop doesn't move up a level.

Cherry-picked from #6567 (2a51757), get_card.py only, then narrowed as above.

Testing

Cherry-picked from #6567 (2a51757), get_card.py only.

A caller whose only card is expired or won't validate had no way out: the
expired-date ToolError told the agent to ask for another card, and
decline_card_capture was documented as refusal-only, so the agent kept
re-asking. Both now route the dead end to decline_card_capture, which ends
capture with the booking held.
@u9g
u9g requested a review from a team as a code owner August 11, 2026 20:17

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

…an see

GetCardTask never authorizes a charge and is also opened for a new booking
that isn't written yet, so it can't promise the booking stays held or judge
that a card "keeps failing". The expired-date error now asks to confirm the
date first, since a past date in voice is usually a misheard year.
@u9g

u9g commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a second commit narrowing the wording after review: dropped "the booking stays held" (false on the new-booking path, where nothing is written until confirm_booking) and "keeps failing / won't validate" (the sub-task never authorizes a charge), and the expired-date error now asks to confirm the date before offering the exit. PR body updated. The BookRoom side of the loop is in #7177, stacked on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants