Skip to content

vapi/agency-routing: the assistant doesn't invent a lookup result before the real one arrives - #54

Merged
leggetter merged 1 commit into
mainfrom
fix/vapi-no-invented-result
Nov 18, 2026
Merged

leggetter merged 1 commit into
mainfrom
fix/vapi-no-invented-result

Conversation

@leggetter

Copy link
Copy Markdown
Collaborator

In a live call the model answered the async tool's placeholder Success. with a made-up "CRM result" and appointment date, a few seconds before the real result arrived. The prompt (TOOL_RULES in src/clients.ts) now:

  • says to say nothing when lookup_customer replies Success., because the holding line has already been said;
  • forbids stating any date, time, appointment, name or account detail not read in the result message, and the words "CRM" or "lookup result";
  • names the result message Account lookup finished. (was CRM result:), which the endpoint now sends (src/server.ts), so the model has no phrase to imitate.

Tested live on 2026-11-18 (Acme Dental, two lookups): the assistant stayed silent after each Success. and only spoke the real result. npm test (35) and typecheck pass; npm run setup applied the prompt to both assistants.

🤖 Generated with Claude Code

Posted by an AI agent with human oversight.

…ore the real one arrives

In a live call the model answered the async tool's placeholder "Success." with a made-up "CRM result" and date. The prompt now says to say nothing after "Success.", never to state account details it didn't read, and the result arrives as "Account lookup finished." so the model has no phrase to imitate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leggetter
leggetter merged commit 964dc3f into main Nov 18, 2026
10 checks passed
@leggetter
leggetter deleted the fix/vapi-no-invented-result branch November 18, 2026 23:37
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.

1 participant