Skip to content

conversation_initiation_client_data with agent.prompt causes immediate disconnect, while sendContextualUpdate works #17

@ibrahimkholil6210

Description

@ibrahimkholil6210

Hi team,

We are seeing a disconnect issue when setting agent.prompt during startSession overrides.

What works:

  • Set firstMessage in overrides.
  • Send prompt later via sendContextualUpdate(...).

What fails:

  • Set prompt in overrides (ConversationOverrides.agent.prompt) during startSession(...).
  • Session reaches connected and returns conversationId, then disconnects immediately.

Observed behavior:

  • status=connecting -> status=connected -> immediate disconnect.
  • Disconnect reasons seen: agent, then error during cleanup.
  • From ElevenLabs console: Invalid message received.

Repro (simplified):

await client.startSession(
  agentId: '...',
  overrides: ConversationOverrides(
    agent: AgentOverrides(
      firstMessage: 'Good evening...',
      prompt: 'Random string', // adding this triggers the issue
      language: 'en',
    ),
  ),
);

If we remove prompt from overrides and instead do:

client.sendContextualUpdate('Random string');

the session stays stable.

Environment:

  • Flutter app on Android (Pixel 6 Pro)
  • elevenlabs_agents package
  • Bluetooth speaker may be connected (but issue also appears without BT in our tests)

Question:

  • Is agent.prompt in conversation_initiation_client_data currently restricted/validated differently from contextual updates?
  • Is there a required payload shape/size limit for prompt at init time?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions