DEV Community

Cover image for The agent asked "Is that correct?" after it had already booked
Vinicius Pereira
Vinicius Pereira

Posted on

The agent asked "Is that correct?" after it had already booked

A caller phones a bike shop. Their kid's bike has a flat and they want it fixed as soon as possible. The agent checks the diary, says today is full, offers Wednesday, and the caller takes 8:30. Then the end of the call:

Agent: Great, what’s your name and phone number?

Caller: It's Ruth Adeyemi. 720 555 0165.

Agent: Just to confirm, Ruth Adeyemi, 720 555 0165. Is that correct?

Caller: Yes, that's right.

Agent: You’re all set for Wednesday at 8:30 AM. Your reference is TW-1001; please mention that if you need anything else.

The prompt told the agent to read the name and number back and wait for a yes before booking. Read top to bottom, that's what happened. The details are right, the caller says yes, the agent confirms. A transcript review passes this call. My harness failed it.

The shop and the caller are scripted. The agent was not: it was gpt-5.4-mini, driven on 26 November 2026 with the prompt that ships with the tool.

callproof demo

There's also a demo video.

The booking came before the yes

Every tool call is logged with the turn it happened in. Turns count from 0, the greeting, so turn 8 is the read-back and turn 9 is the yes. This is the booking:

{
  "name": "book_service",
  "args": {
    "name": "Ruth Adeyemi",
    "phone": "7205550165",
    "bike": "kid's bike",
    "job": "flat repair",
    "date": "2026-12-02",
    "time": "08:30"
  },
  "result": {
    "ok": true,
    "reference": "TW-1001",
    "say_reference_as": "T W, 1 0 0 1",
    "date": "2026-12-02",
    "time": "8:30 am"
  },
  "at": 8
}
Enter fullscreen mode Exit fullscreen mode

"at": 8. The booking ran in the turn that ends with "Is that correct?". The yes arrived one turn later, when the row was already in the diary.

The reference number gives it away. TW-1001 comes back in the result of book_service. The agent holds it until turn 10, after the yes, which is why the transcript reads in the right order. The reference already existed when it asked whether the phone number was right.

The saved call scores the same way offline:

$ callproof score examples/gpt-5.4-mini_booked_before_yes.json --scenario src/callproof/scenarios/06_asap.toml
callproof  1 scenario against drive:gpt-5.4-mini @ https://api.openai.com/v1

 FAIL      06_asap                  As soon as possible, late in the day           13 turns
        readback: book_service ran at turn 8 before the name and number were read back and confirmed
          turn 8 agent: Just to confirm, Ruth Adeyemi, 720 555 0165. Is that correct?

fail 1
Enter fullscreen mode Exit fullscreen mode

The scenario runs four checks: times_from_diary, booking, readback and no_claim_without_tool. One failed and none was skipped. The offered times came from the diary, the diary row has the right name, number, day and time, and the agent never claimed a booking before the tool had run. The one thing wrong is the order, and the order is the one thing the prompt spelled out.

This time the details were right, so booking early cost nothing. The read-back exists for the call where they are wrong. That call shows up further down.

Why the transcript can't see it

With a tool-calling chat API, one spoken turn can take several requests. callproof's chat driver sends the conversation to the model, and if the reply asks for tools, it runs them against the shop, appends the results and asks again, until the model answers with plain text. Only that text becomes the agent's turn. The runner stamps the turn number before the agent starts on it:

while len(turns) < sc.expect.max_turns:
    line = caller.reply(turns[-1].text)
    if line is None:
        ended = caller.end_reason or "caller"
        break
    turns.append(Turn("caller", line))
    box.at = len(turns)
    turns.append(Turn("agent", agent.respond(line)))
Enter fullscreen mode Exit fullscreen mode

box.at is set before agent.respond runs, so every tool call made while the agent works out its reply is recorded against that reply's turn. Any text respond() returns comes from a completion that asked for no tools, so the request that produced "Is that correct?" already carried the book_service result, reference TW-1001 included.

The transcript is what the turn said. The tool log is what happened while it was being said. Reading a call gives you only the first.

The harness

callproof is what made that call. It drives a voice agent through scripted phone calls against a fictional shop, Tidewater Bike Works, and scores each call on the tool calls and the shop's diary, never on what the agent says.

The caller works out what it was asked and answers that, so an agent that wants the number before the bike doesn't knock it off track. The line shapes what the caller says the way speech-to-text would hand it over: a phone number as "two oh seven, triple five, oh one double oh", a name as "It's Ana Lima. A, N, A. L, I, M, A.", a name misheard as "Merrick Novak" that the caller corrects to Marek at the read-back. The shop has a frozen clock (Tuesday 1 December 2026, 16:40), a diary with a few slots taken, five tools (check_availability, book_service, add_to_booking, lookup_policy, take_message) and validation that refuses closed days, taken slots and short phone numbers.

The agent's words count only where they can be held against the record: an offered time against what the availability tool returned, a "you're booked" against a booking that succeeded, a read-back against the caller's yes before the booking ran. readback passes when the name and the exact number were read back in one turn and the caller said a plain yes, before the booking tool ran. Each bundled scenario also comes with an offline agent that has exactly the bug it targets, and CI fails if one of them slips through.

Twenty-one calls

The bundled prompt tells the agent to read the name and number back and wait for a yes before it books. I drove gpt-5.4-mini with it, three calls per scenario:

$ callproof run --agent chat --model gpt-5.4-mini --repeat 3 --max-requests 200 --save runs/
callproof  7 scenarios against gpt-5.4-mini @ https://api.openai.com/v1, 3 runs each

 PASS  3/3 01_book_plain            A plain booking                                11 turns
 FLAKY 2/3 02_phone_spoken          Phone number said the way people say it        13 turns
        booking: phone 20755501100, expected 2075550100
        readback: book_service ran at turn 6 before the name and number were read back and confirmed
          turn 6 agent: You’re booked for Friday at 8:00 a.m. for the flat repair on your gravel bike, and your reference is TW…
 LOST  1/3 03_spelled_name          Name spelled in one breath                     13 turns
        readback: book_service ran at turn 8 before the name and number were read back and confirmed
          turn 8 agent: Thanks, Ana Lima, 415 555 0134. You’re booked for Wednesday at 8:30 a.m., reference T W 1 0 0 1.
 FLAKY 1/3 04_misheard_name         Name heard wrong, corrected at the read-back   11 turns
        booking: name 'Merrick Novak', expected 'Marek Novak'
        readback: book_service ran at turn 6 before the name and number were read back and confirmed
          turn 6 agent: You’re booked for Thursday at 8:30 a.m. under Merrick Novak, 503 555 0178, reference T W, 1 0 0 1.
 FLAKY 1/3 05_extra_after_booking   Extra work asked for after the booking         13 turns
        readback: book_service ran at turn 8 before the name and number were read back and confirmed
          turn 8 agent: You’re booked for Saturday at 8 am for your city bike tune-up. Your reference is TW-1001.
 FLAKY 1/3 06_asap                  As soon as possible, late in the day           13 turns
        readback: book_service ran at turn 8 before the name and number were read back and confirmed
          turn 8 agent: Just to confirm, Ruth Adeyemi, 720 555 0165. Is that correct?
 FLAKY 2/3 07_policy_unknown        A question the shop's policy does not answer   7 turns
        message_taken: take_message at turn 2: no argument holds the caller's name 'Lena Ortiz'; no argument holds the caller's number 9195550157
          turn 2 agent: I’m sorry, I don’t have anything on file about loaner bikes, so I’ll pass that to the owner. If you’d l…

flaky 5, lost 1, pass 1
166 chat completion requests
records saved to runs/
Enter fullscreen mode Exit fullscreen mode

21 calls and 166 completion requests: 11 passed, 9 failed, 1 was not scored.

Seven of the nine failures broke the rule the prompt states most plainly. Four calls booked without reading the name and number back. Two read them back in the same turn that said "You’re booked". The seventh is the Ruth Adeyemi call, the only one of the seven that reads like a pass.

Four calls stored a wrong detail. A call can fail two checks, as the 02 and 04 lines show, so some of these are among the seven. Two booked the name the line misheard, "Merrick Novak". In one of them the caller corrected it after the booking, and the agent answered "I’ll update that right away" and called no tool. The shop has no tool that changes a name. That is the call the read-back exists for. One stored the number given as "two oh seven, triple five, oh one double oh" with an extra digit, 20755501100. One booked 9 am for a caller who wanted the earliest time, without asking and without checking that day's times, while 8:30 was free. Its read-back was correct.

The ninth took the message for the owner before asking who was calling, as "Caller" with the number 0000000000. Then it heard the name and number and said "I’ve passed that along" without taking the message again.

In the same calls the model never told a caller they were booked before the booking tool had run (17 of 17 scored calls), offered only times the diary had returned (5 of 5 calls that offered times), added the work asked for after the booking (3 of 3), kept the spelled name Ana Lima whole (both 03 calls that booked), and in all three 07 calls looked the policy up and passed the question to the owner instead of answering it.

Every scenario passed at least once, and six of the seven also failed at least once. Only the plain booking went 3 for 3. One test call per scenario shows how that call went, not how often the next one will go the same way.

The LOST on the 03 line is a fault of the harness. In one of those calls the agent listed Wednesday's times as a statement ("We’ve got 8:30, 9:00, 9:30, or 10:00 on Wednesday for the tune-up."). My scripted caller had already accepted Wednesday, said "Wednesday works." again instead of picking a time, and gave up a turn later. A caller that loses the thread is no evidence against the agent, so callproof reports the call as LOST instead of as a failure, and the run exits 2, the code it also uses for a broken setup or a call that errored. Exit 1 means a check failed and nothing else. The detail lines under 03 come from its failed call.

On your own agent

--agent chat talks to any endpoint that serves the OpenAI /chat/completions API with tool calling. Swap in your model, your base URL or your prompt:

export OPENAI_API_KEY=...
callproof run --agent chat --model gpt-5.4-mini --repeat 3
callproof run --agent chat --model my-model --base-url http://localhost:8000/v1 --api-key-env MY_KEY
callproof run --agent chat --model gpt-5.4-mini --prompt my_receptionist.md   # your prompt, the shop's tools
Enter fullscreen mode Exit fullscreen mode

--prompt replaces the receptionist prompt; the tools stay the shop's. --repeat reports each scenario as PASS 3/3, FLAKY 2/3 or FAIL 0/3. --max-requests N is a hard cap on completion requests for the whole run, and --save runs/ writes every call record and its results as JSON. Python 3.11 or newer, no dependencies.

Driven runs are text, so they never have a latency. Real calls do. callproof score reads a call exported from Retell (the object returned by GET /v2/get-call/{call_id}), runs the same checks on it, and adds a latency budget on the end-to-end response times Retell measured. The example here is a made-up call for the fictional shop:

$ callproof score examples/retell_call.json --scenario examples/retell_scenario.toml
callproof  1 scenario against retell:call_example_tidewater_0001

 FAIL      retell_scenario          Example call exported from Retell              13 turns
        times_from_diary: turn 2 offers 9 am, 10:30 am, before any check_slots
          turn 2 agent: Sure, Thursday I've got 9 am or 10:30. Which one works?
        latency: 5 measured responses, p50 1010 ms, p95 2650 ms, max 2650 ms; over budget: p95_ms 2650 > 2000

fail 1
Enter fullscreen mode Exit fullscreen mode

Your tools have their own names, so the scenario maps them:

[expect]
checks = ["readback", "no_claim_without_tool", "times_from_diary"]
booking_tool = "book_appointment"
availability_tool = "check_slots"
latency = { p50_ms = 1200, p95_ms = 2000 }      # p50_ms, p90_ms, p95_ms, max_ms
Enter fullscreen mode Exit fullscreen mode

The get-call object keeps tool call invocations and results in the same list as the utterances (transcript_with_tool_calls), so readback can check the order on a real call too. A call from a list endpoint has no transcript; callproof refuses it and says to fetch the call by id.

What it does not tell you

  • Driven runs are text. No speech recognition, no voice, no interruption, no latency. The hearing styles model what speech-to-text delivers, not how audio sounds.
  • The caller and the checks read English with patterns. A phrasing outside them is missed, not guessed. One miss is on purpose: "I have you down for Thursday" is how many agents start a read-back, so it doesn't count as a booking claim.
  • The scripted caller has gaps of its own. Times listed as a statement on a day it already accepted can end the call LOST, as above. It doesn't correct a name said back without the number, which is how "under Merrick Novak" got past it in the other Merrick Novak call. The booking had already run there, so the verdict is the same.
  • message_taken checks that a proper message was taken. It doesn't judge what the agent said around it, so an agent that improvises a policy and also takes the message passes.
  • On imported calls, booking and extras are skipped, because they need the shop's diary. Retell is the only importer so far.
  • This is 21 calls of one model, with one prompt, on one day. It records what those calls did and makes no ranking of the model.

"Is that correct?" is only a question while nothing has been booked.

Top comments (7)

Collapse
 
prpatel05 profile image
Pratik Patel •

This is the clearest example I've seen of why I don't let the prompt own ordering. "Read back and wait for a yes" is a rule about time, and the model doesn't experience turns the way the transcript shows them. It sees one request with the tools available and the slot right there.

What's worked for me is making the tool enforce it: split book_service into hold and commit, and have commit require a confirmation id the harness only mints after a caller turn that answered the read-back. Then booking early isn't a prompt violation, it's a call that fails. The case I'd add to callproof is the "no, it's 0156" path, because an agent that booked early now has to edit or cancel, and that's usually where the duplicate row comes from.

Collapse
 
vinimabreu profile image
Vinicius Pereira •

Added in 0.2.0. The shop now has update_booking and cancel_booking, and a new scenario has the caller give 608 555 0165, then say "No, sorry, I gave you the wrong number. It's 608 555 0156." at the read-back, or right after "you're booked" if the agent skipped the read-back.

Two broken agents prove it gets caught. One books a second row for the corrected number, and the booking check fails it with "2 bookings in the diary for one call". The other says "I'll update that right away" and calls nothing, which fails a new check, no_change_claim_without_tool. I ran that check over the 21 saved gpt-5.4-mini calls and it flags exactly one line: the "I'll update that right away" from the misheard-name call.

An agent that books early and then fixes the row with update_booking passes the booking check and still fails readback, since the diary held a booking nobody had confirmed. That's the part your hold and commit split removes at the source.

The yes check also no longer takes "Yeah, no, it's 0156" or "Yeah, it's 0156" after a 0165 read-back as a confirmation.

Collapse
 
vinimabreu profile image
Vinicius Pereira •

Agreed, the tool is where the order belongs. A prompt rule can only be checked after the call, which is all callproof does. A commit that needs a confirmation id can't run early at all.

Two things I'd add to the mint. Tie the id to what was read back (name, number, slot), so a commit with other args fails. And the hard part moves to deciding that a caller turn answered the read-back. Your own example starts with a yes: "Yeah, no, it's 0156". After your comment I ran that line through callproof's yes check and it counts as a clean yes. The scripted caller never says it, since its corrections start with "No,", so the runs never hit it. An imported Retell call would.

The run has a version of your correction path, with a name instead of a number. In 2 of the 3 misheard-name calls, gpt-5.4-mini booked "Merrick Novak" at turn 6, before any read-back. In one of them the caller said "No, my name is Marek Novak", and the agent said "Got it, Marek Novak. I'll update that right away." No tool call came after it. The test shop has no edit or cancel tool, so there was nothing to call, and the diary kept Merrick. The booking check failed it on the name. The claim check passed, because it only looks for claims that the job is booked.

So that call left one wrong row and a promise, and no duplicate. Your case needs three changes: edit and cancel tools in the shop, so the agent has a real choice; a caller who changes the number at the read-back on purpose, so the path runs whether or not the agent heard right; and a claim check that treats "I'll update that" like "you're booked". The booking check already fails two rows for one call.

Collapse
 
alexshev profile image
Alex Shev •

This is a strong example of why transcript quality is not a substitute for event ordering. The scenario should model confirmation as a state transition that produces a short-lived authorization token, and require book_service to present that token. Then an early booking is rejected by the tool boundary itself, while the harness still preserves the trace that explains the failure.

Collapse
 
vinimabreu profile image
Vinicius Pereira •

With the token, the early book_service comes back with an error instead of a row. So the failure moves to what the agent says next. A model can still tell the caller "you're all set" after that error. callproof's claim check only counts a book_service that returned ok, so that call still fails, and the record keeps the rejected call next to the claim.

I'd drop "short-lived" though. On a phone call a timer is the wrong trigger. A caller can say yes and fix the number a few seconds later, and the timer won't notice. Another can ask what the tune-up costs between the yes and the booking and lose a good confirmation to the clock. I'd end the token on events: a caller turn that changes any value that was read back, or the commit that spends it.

And the side that heard the caller has to mint it. If the model can call a confirm tool, the order is back in its hands. In one of the gpt-5.4-mini calls the agent asked "Is that correct?" and called book_service in that same turn. A confirm tool could have gone into that turn just as easily.

Collapse
 
syedfahads profile image
Syed Fahad •

holding TW-1001 for two turns and then asking "is that correct?" is kinda creepy ngl. it's a waiter asking if you want soup after it's already on the table

Collapse
 
vinimabreu profile image
Vinicius Pereira •

Ha, that's the right picture. And the polite question is what hides it: read the transcript alone and the agent sounds careful.

The awkward part is the "no". In one of the misheard-name calls the caller corrected the name after the booking, the agent said "I'll update that right away", and nothing ran, because the shop had no tool that changes a name. The soup went back to the kitchen in words only and stayed on the bill.