a2aproject / a2aproject/a2a-rs
[Bug]: Duplicate/Aggregated artifacts when using the same context id but different task ids and artifact ID's?
- Dominant language
- Rust
- Stars
- 75
- Forks
- 19
- Avg merge
- 11h 27m
- Merged PRs (30d)
- 21
Description
### What happened?
1. Start a new session (a2a-rs protocol version 0.11.0!)
2. client sends a new prompt to agent: 'yo'
3. new context id (A) and task id (T1) is created
4. agent queues artifact A1 and completes task
5. client sends a new prompt to agent: 'yo2'
6. context id A is re-used as expected. task id is new (T2)
7. agent queus artifact A2 and completes task.
8. client received task update with context id A, task id T2 and artifacts A1 AND A2
I'm not 100% sure but is (8) now a bug or is this how it's supposed to be and I'm doing something wrong? I interpreted the spec that when a new task is created it should only contain the artifacts related to the task and not the aggregate of the whole context_id. I end-up now client-side with all the duplicates.
Does anyone know? Thanks a lot.
### Relevant log output
```shell
2026-09-07T08:12:41.344030Z DEBUG a2a_protocol_server::handler::messaging: creating task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 context_id=45e13205-3df7-4e84-ad5e-d8df06a76187
2026-09-07T08:12:41.344133Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Submitted
2026-09-07T08:12:41.344263Z DEBUG a2a_protocol_server::handler::messaging: executor started task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279
2026-09-07T08:12:41.344313Z DEBUG coordinator::executor: context 45e13205-3df7-4e84-ad5e-d8df06a76187 task ddf997f4-d94a-49e3-a425-dc26db9b9279 : Handling request yo
2026-09-07T08:12:41.344320Z DEBUG a2a_protocol_server::store::task_store::in_memory: fetching task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279
2026-09-07T08:12:41.344384Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Working
2026-09-07T08:12:41.344555Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Working
2026-09-07T08:12:41.344578Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Completed
2026-09-07T08:15:41.118167Z DEBUG a2a_protocol_server::handler::messaging: creating task task_id=67a20697-583f-4212-9af5-8bb782dbd34a context_id=45e13205-3df7-4e84-ad5e-d8df06a76187
2026-09-07T08:15:41.118268Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Submitted
2026-09-07T08:15:41.118492Z DEBUG a2a_protocol_server::handler::messaging: executor started task_id=67a20697-583f-4212-9af5-8bb782dbd34a
2026-09-07T08:15:41.118531Z DEBUG coordinator::executor: context 45e13205-3df7-4e84-ad5e-d8df06a76187 task 67a20697-583f-4212-9af5-8bb782dbd34a : Handling request yo2
2026-09-07T08:15:41.118530Z DEBUG a2a_protocol_server::store::task_store::in_memory: fetching task task_id=67a20697-583f-4212-9af5-8bb782dbd34a
2026-09-07T08:15:41.118593Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Working
2026-09-07T08:15:41.118764Z DEBUG a2a_protocol_server::store::task_store::in_memory: applied artifact delta in place task_id=67a20697-583f-4212-9af5-8bb782dbd34a
2026-09-07T08:15:41.118812Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Completed
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.