Skip to content

Commit 433401e

Browse files
committed
fix(a2asrv): skip TaskID mismatch check when message has no task reference (fixes #350)
When loadExecutionContext receives a message without a TaskID (e.g. on retry in cluster mode), the condition message.TaskID != tid falsely rejects it because the empty-string TaskID cannot match any real tid. Add an empty-string guard so messages with no task reference are accepted.
1 parent 6a48d4b commit 433401e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

a2asrv/agentexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (f *factory) loadExecutionContext(ctx context.Context, tid a2a.TaskID, para
192192
}
193193

194194
storedTask, lastVersion := taskStoreTask.Task, taskStoreTask.Version
195-
if message.TaskID != tid {
195+
if message.TaskID != "" && message.TaskID != tid {
196196
return nil, fmt.Errorf("bug: message task id different from executor task id")
197197
}
198198

0 commit comments

Comments
 (0)