Description
When a user sends a message containing a URL, ElizaOS processes it twice:
- As text content → generates response
- As attachment (metadata/preview) → generates second response
Both responses are sent through the same SSE stream before the done event, resulting in duplicated text in the final response.
Steps to Reproduce
- Start ElizaOS with webapp
- Send a message containing a URL (e.g., "Check this: https://example.com")
- Observe the response
Expected Behavior
URL should be processed once, generating a single response.
Actual Behavior
Two identical (or near-identical) responses are generated and streamed as one message, doubling token usage and producing duplicated output.
Impact
- 2x LLM API calls per message with URL
- Doubled token costs
- Poor UX with duplicated responses
- Forces workarounds on client side
Environment
- ElizaOS version: [your version]
- Client: webapp
Suggested Fix
Ensure URL is processed either as text OR as attachment, not both. The decision should happen in the message processing flow before LLM calls.