This looks like a context mismatch during tool execution, not a prompt issue.
Even though the call is inbound and logged as phone_call, this error usually occurs when the SMS tool is triggered outside the active call context (e.g. after call state ends, async step, or delayed agent action). Native SMS can only execute while the call session is live.
Key checks:
• Ensure send_sms is triggered during the active call, not after a response completes
• Avoid conditional or delayed tool calls
• Use a minimal static payload (no dynamic fields)
No special system prompt is required — this is not LLM behavior-related.
If this still occurs, it’s likely a backend flag or account-level restriction, and Retell support will need to validate SMS enablement on your number.
Happy to help verify your flow or narrow this down further.