Skip to content

Build and run agents you can see, understand and trust.

fix(plan): fix the error that won't save the subtask state in session management (#863)

Young19890245c63bf3169d
diff --git a/src/agentscope/plan/_plan_model.py b/src/agentscope/plan/_plan_model.py
index 8240bce18..c262419c3 100644
--- a/src/agentscope/plan/_plan_model.py
+++ b/src/agentscope/plan/_plan_model.py
@@ -39,7 +39,6 @@ class SubTask(BaseModel):
state: Literal["todo", "in_progress", "done", "abandoned"] = Field(
description="The state of the subtask.",
default="todo",
- exclude=True,
)
created_at: str = Field(
description="The time the subtask was created.",
diff --git a/tests/plan_test.py b/tests/plan_test.py
index 98facdd39..e9eeffad8 100644
--- a/tests/plan_test.py
+++ b/tests/plan_test.py
@@ -326,12 +326,14 @@ Subtask at index 2:
"name": "1",
"description": "1",
"expected_outcome": "1",
+ "state": "todo",
"created_at": subtasks[0].created_at,
},
{
"name": "2",
"description": "2",
"expected_outcome": "2",
+ "state": "todo",
"created_at": subtasks[1].created_at,
},
],