microsoft / microsoft/agent-framework
.NET: [Feature]: Extend RunStatus to cover distributed/durable workflow states
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
### Problem
The current [`RunStatus`](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/RunStatus.cs#L8) enum covers in-process workflow lifecycle states:
1. NotStarted
2. Idle
3. PendingRequests
4. Ended
5. Running
These work well for in-process workflows, but don't cover states that arise in distributed/durable workflow scenarios, such as:
1. **Completed** : The workflow finished successfully. _(Is Ended same? Was it a successful end or non successful end?_)
2. **Failed** : The workflow terminated due to an error.
3. **Terminated** : The workflow was explicitly terminated by an external request.
4. **Suspended** : The workflow is paused and can be resumed later.
5. **NotFound** : The workflow instance doesn't exist (e.g., expired or never created).
6. **Pending** : The workflow is scheduled but hasn't started executing yet.
Currently, distributed workflow implementations have to define their own status enums to represent these states, since `RunStatus` doesn't have equivalents. Only `Running` overlaps between the two.
### Proposal
Extend `RunStatus` (or introduce a complementary enum) to include terminal and distributed-specific states so that all workflow runtime implementations can use a shared status type. This would allow consumers to write runtime-agnostic code that checks workflow status without depending on implementation-specific enums.
Contributor guide
Research direction
Start by reading dotnet/src/Microsoft.Agents.AI.Workflows/RunStatus.cs at the enum definition. Review how the existing in-process states map to the proposed distributed and durable workflow states, especially the distinction between Ended and Completed. Done means the shared status design covers the listed runtime states and supports implementation-agnostic status checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100