Skip to content

fix(workflows): ask before recording a volunteered value - #6980

Merged
u9g merged 5 commits into
mainfrom
jason/inline-task-capture-fixes
Aug 26, 2026
Merged

fix(workflows): ask before recording a volunteered value#6980
u9g merged 5 commits into
mainfrom
jason/inline-task-capture-fixes

Conversation

@u9g

@u9g u9g commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What

Two fixes surfaced by the data-capture-sim CI job (examples/data_capture_sim), which had been red on main since Aug 14. Split out of #6849, which now stacks on this branch. The related framework fix is #6981.

1. GetEmailTask / GetPhoneNumberTask / GetAddressTask fabricate a value on enter (beta/workflows)

The on_enter instruction added to stop re-asking for a volunteered value led with the tool call ("First scan the conversation - if an email was already given, use it via update_email_address… Only ask fresh when…"). With nothing from the user in context, gpt-4.1 filled the call from whatever address-shaped text was nearby in the system prompt (john.doe@gmail.com, mikeb22@gmail.com) and the task completed before the user spoke. tests/test_workflows.py::test_collect_email failed 3/3 locally.

Clause order is the variable, not detail: wordings that lead with asking and make recording the exception pass. A/B on gpt-4.1, 5 trials each, two scenarios:

on_enter wording empty context value volunteered earlier
tool-call first (as merged) 1/5 5/5
"Ask the user for their email address. If the user already stated one earlier in this conversation, record it with update_email_address instead of asking again." 5/5 5/5

Confirmed 20/20 before applying to all three tasks. test_collect_email passes 3/3 in both modalities. The example address list in the email task's audio instructions is replaced by rules; the one behavior only an example carried (a local part with no domain) becomes a rule.

2. data-capture-sim scenarios

  • The simulated caller holds back any goal that provides a personal detail until the agent asks for it, and the agent only collects a detail the caller has named. An opening line that carries the value is held back with it, and both DOB scenarios stalled for five turns then hung up. They now open by naming the detail.
  • The card task tells the caller to read digits one at a time, so the model asks for the rest of a 10-digit number rather than passing it to the tool. The expectation now judges what is recorded, not the wording of the refusal.

Result

With both this and the framework fix: data-capture-sim 3/10 → 9/10 (the remaining failure: the sim user skipped its opening line and gave the number before entering the task). evaluation green.

u9g added 3 commits August 25, 2026 17:33
…-asking

GetNameTask and the three credit-card sub-tasks scan the conversation on
enter before asking. GetEmailTask, GetPhoneNumberTask and GetAddressTask
were left with a bare "ask the user to provide ...", so a caller who
volunteers the value up front is asked for it a second time - the task sees
it in chat_ctx and its update tool is callable on enter, but nothing tells
it to look. Same wording as the tasks that already do this.
…resses

The audio instructions listed five example addresses that restate the
normalization rules below them. The one case only an example carried,
a local part with no domain, becomes a rule.
The on_enter instruction led with the tool call and made asking the
fallback. With nothing from the user in context yet, the model filled the
call from whatever address-shaped text was nearby and the task completed
before the user spoke. Asking is the default action; recording an address
the user already stated is the exception.
@u9g
u9g requested a review from a team as a code owner August 25, 2026 21:37
@u9g
u9g force-pushed the jason/inline-task-capture-fixes branch from d659df6 to ea888c4 Compare August 25, 2026 21:38
u9g added 2 commits August 25, 2026 17:40
…sked for

The simulated caller holds back any goal that provides a personal detail
until the agent asks for it, and the agent only collects a detail the
caller has named. An opening line that carries the value is held back
with it, so both sides wait and the call stalls out. The two date of
birth scenarios now open by naming the detail, with the value kept for
the ask.
The card task tells the caller to read digits one at a time, so the
model treats ten digits as a partial number and asks for the rest rather
than passing it to update_card_number. That neither records the short
number nor goes silent, which is the behavior under test; requiring the
words "invalid" or "incomplete" failed it on phrasing. The caller gives
all sixteen digits on the retry: "let me start again" read to the card
task as a request to abandon the capture.

@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 bugs or issues to report.

Open in Devin Review

@u9g
u9g force-pushed the jason/inline-task-capture-fixes branch from ea888c4 to d3c0bff Compare August 25, 2026 21:56
@u9g u9g changed the title fix(agents): keep an inline AgentTask's parent from restarting the capture fix(workflows): ask before recording a volunteered value Aug 25, 2026
@u9g
u9g merged commit 38095e1 into main Aug 26, 2026
22 of 23 checks passed
@u9g
u9g deleted the jason/inline-task-capture-fixes branch August 26, 2026 16:17
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.

2 participants