sdk.warn when something unexpected or potentially problematic occurs, but execution can continue. Warning entries render in yellow in the dashboard terminal — visible enough to catch your attention during a review, but distinct from the red of a critical error. The platform does not treat a warn entry as a run failure.
Parameters
A description of the warning condition.
Optional key-value data providing context for the warning. Include values like retry counts, rate limit headers, or degraded-mode flags so the dashboard can display them as formatted JSON.
Example
When to use
Callsdk.warn for:
- Rate limits approaching or being hit, when the agent will retry
- Falling back to a degraded or cached data source
- Missing optional configuration that has a default fallback
- Unexpected but recoverable responses from external APIs
sdk.error instead when the condition prevents the agent from completing its task.
Dashboard rendering
sdk.warn entries render in yellow in the Dolphinclaw dashboard terminal. This colour draws attention without the urgency of a red error, making it easy to spot potential issues in a log stream without misreading them as failures.