diff --git a/core/agent/agent.go b/core/agent/agent.go index 0e3558f..cdb01f7 100644 --- a/core/agent/agent.go +++ b/core/agent/agent.go @@ -391,6 +391,13 @@ func (a *Agent) processUserInputs(job *types.Job, role string, conv Messages) Me } func (a *Agent) consumeJob(job *types.Job, role string) { + + + if err := job.GetContext().Err(); err != nil { + job.Result.Finish("expired")) + return + } + a.Lock() paused := a.pause a.Unlock()