Return a job handle immediately and let the agent poll for status (or receive a callback) instead of blocking, and give progress information the agent can reason about.
Set timeouts, support cancellation, and persist job state so the agent can resume after a restart.
For anything beyond seconds, consider running it as a background task with a notification, and avoid keeping a model call open while waiting.
Loading…