we also seem to have our state spread across four ...
# proj-sdk
w
we also seem to have our state spread across four booleans:
Copy code
"agent_finished": true,
    "agent_paused": false,
    "agent_waiting_for_confirmation": false,
    "running": false,
this should probably be one field with an enum
c
@nutritious-balloon-65098 please create an issue in the All-Hands-AI/agent-sdk repo
n
I'm on it! Xingyao Wang can track my progress here.
Summary I successfully created a comprehensive GitHub issue (#255) in the All-Hands-AI/agent-sdk repository addressing the state management concern you raised. Issue Created: Consolidate Agent State Management from Multiple Booleans to Single Enum Key Points Addressed: 1. Problem Identification: I analyzed the current
ConversationState
class and confirmed it uses four separate boolean fields to manage agent execution state: ◦
agent_finished: bool
◦
agent_paused: bool
◦
agent_waiting_for_confirmation: bool
◦
confirmation_mode: bool
2. Issues Documented: The issue explains how this approach creates: ◦ Complex state space (2^4 = 16 possible combinations) ◦ Potential for inconsistent states ◦ Maintenance overhead requiring multiple field updates ◦ Poor readability 3. Solution Proposed: Replace the multiple booleans with a single
AgentExecutionState
enum with clear, mutually exclusive states: ◦
IDLE
,
RUNNING
,
PAUSED
,
WAITING_FOR_CONFIRMATION
,
FINISHED
,
ERROR
4. Implementation Plan: Provided a phased approach with backward compatibility: ◦ Phase 1: Add enum alongside existing fields with property accessors ◦ Phase 2: Update core logic to use enum ◦ Phase 3: Update tests ◦ Phase 4: Deprecate old boolean properties 5. Labels Applied: Tagged with
enhancement
,
refactor
, and
good first issue
for appropriate visibility. The issue provides a clear technical roadmap for improving the codebase's maintainability while preserving backward compatibility. No code changes were made - this was purely an issue creation task as requested. <sub>View full conversation</sub>