Conversational Agent Responds but Doesn’t End Session

Hi all — we’re working on Conversational Agents (playbook only) and encountering a session-ending issue.

Problem:

After 3 unclear inputs or a keyword trigger, the agent:

  • Replies with the correct fallback line (e.g. “We weren’t able to help…”)
  • But doesn’t terminate the session even thought we have instructed it in the playbook
  • Just waits for more input, repeating and looping endlessly

:hammer_and_wrench: What We’ve Tried:

  • Using Call: terminate_session_tool
  • Using Call: terminate_session_tool plus action: done
  • Ensuring the Say: and Call: are under the same conditional
  • We know Then: End session is just descriptive, we’re not relying on that,even though it seems to do the trick sometimes!

:thinking: Still Seeing:

  • Inconsistent behavior (sometimes works, sometimes loops)
  • Most common in:
    • Final fallback after 3 nonsense inputs
    • Keyword trigger
    • Or if the user ends the conversation

:folded_hands: Questions:

  • Is this a known Gemini Playbooks bug?
  • Are there undocumented requirements for terminate_session_tool to succeed?
  • Could rule placement or indentation affect execution?
  • Is action: done required for all session-ending steps?

If you’ve got a working pattern, we’d love to see it. Really appreciate any tips!

Thanks,

Hi KJ_24,

Please see my answers inline with your questions below:

  • Is this a known Gemini Playbooks bug?

    Not necessarily a bug, but a common challenge when dealing with a generative agent like Dialogflow CX Playbooks. Playbooks use LLMs, which are nondeterministic, to control the conversation, take actions, and respond to end-users. Sometimes, an agent may not reach a definitive session-ending instruction if there isn’t a clear, explicit, and consistently enforced termination mechanism.

  • Are there undocumented requirements for terminate_session_tool to succeed? Is action: done required for all session-ending steps?

    The terminate_session_tool is not a standard way to end a session within Dialogflow CX Playbooks. As quoted from the documentation, here are ways to achieve more explicit control like session-ending:

    “By default, playbooks use LLMs to control the conversation, take actions, and respond to end-users. If you need more explicit control over the agent’s behavior, you can use flows or conditional actions.”

    You can try transitioning to a Dialogflow CX flow for deterministic flow control over the agent’s behavior using symbolic transition targets.

  • Could rule placement or indentation affect execution?

    Yes, they could directly affect execution, it sometimes causes the inconsistent behavior within your playbook. For overall Playbook best practices, you may refer to this documentation.