Wait for a specific message to appear in a conversation
Wait for a specific message to appear in a conversation.
This command is designed for testing and automation.
It polls a conversation periodically looking for a message containing the specified text (needle). Once found, it exits successfully.
If the message is not found within the timeout period, it exits with an error.
This is useful for testing asynchronous message delivery, where you need to wait for a response from an agent or another user.
Flags: --timeout Maximum time to wait in seconds (default: 30) --interval Polling interval in seconds (default: 1) --exact Match exact message text instead of substring
Examples:
Wait for a message containing "Hello"
mutiro user wait-message conv-123 "Hello"
Wait up to 60 seconds for an exact match
mutiro user wait-message conv-123 "Hello, how are you?" --timeout 60 --exact
Poll every 2 seconds
mutiro user wait-message conv-123 "response" --interval 2
mutiro user wait-message [conversation-id] [needle] [flags]
Wait for a message containing "Hello"
Wait up to 60 seconds for an exact match
Poll every 2 seconds
| Flag | Type | Description |
|---|---|---|
| --exact | bool | Match exact message text instead of substring |
| -h, --help | bool | help for wait-message |
| --interval int | bool | Polling interval in seconds (default 1) |
| --timeout int | bool | Maximum time to wait in seconds (default 30) |
| Flag | Type | Description |
|---|---|---|
| --config | string | config file (default is ./.mutiro.yaml in current directory) |
| --debug | bool | debug mode |
| -v, --verbose | bool | verbose output |