Skip to content

The agent that grows with you

fix(onboarding): a card closed without an answer is not reported as five minutes of silence

alt-glitchaa60528f440e
diff --git a/agent/onboarding_text.py b/agent/onboarding_text.py
index d637d1e40e7..3a77998c32b 100644
--- a/agent/onboarding_text.py
+++ b/agent/onboarding_text.py
@@ -278,8 +278,10 @@ def _said(record, facts, beat: str) -> str:
def _timed_out(record, facts, beat: str) -> str:
- return (f"No answer to the {beat} card in five minutes; it is closed. Say one short line that they can pick up "
- f'whenever they are back, then stop. When they return, bring it back with setup_beat(beat="{beat}").')
+ # Also the result when they sent a file or a slash command while the card waited.
+ return (f"The {beat} card closed without an answer. If a message from them comes next, answer it first. "
+ f"Otherwise say one short line that they can pick up whenever they are back, then stop. When they "
+ f'return, bring it back with setup_beat(beat="{beat}").')
def reminder(key: str, record: Mapping[str, Any], facts: Facts, beat: str | None = None,
diff --git a/tests/tools/test_setup_beat_tool.py b/tests/tools/test_setup_beat_tool.py
index 91112be08c6..ff51f2968b4 100644
--- a/tests/tools/test_setup_beat_tool.py
+++ b/tests/tools/test_setup_beat_tool.py
@@ -85,7 +85,7 @@ def test_no_answer_closes_the_card_and_typed_words_come_back_as_said(db, desktop
desktop.replies.append({"said": "what is Elite?"})
said = call(db, desktop, beat="layout", call_id="call_2")
- assert timed_out["timed_out"] is True and "five minutes" in timed_out["reminder"]
+ assert timed_out["timed_out"] is True and "closed without an answer" in timed_out["reminder"]
assert said["said"] == "what is Elite?" and 'setup_beat(beat="layout")' in said["reminder"]
assert onboarding_record.load(db, SID)["waiting"] is None