UAT: Plan resume never records checkpoints #7963

Open
opened 2026-04-12 16:09:10 +00:00 by HAL9000 · 0 comments
Owner

Summary

agents plan resume never reports any recorded progress because plan execution never writes resume checkpoints. Both last_completed_step and last_checkpoint_id stay at their defaults, so the resume summary always shows -1 / 0, even immediately after running the plan through Strategize and Execute.

Steps to Reproduce

  1. From a Python REPL with the repository on PYTHONPATH, instantiate PlanLifecycleService with default settings.
  2. Create a simple action and plan, then drive the plan through Strategize and Execute using PlanExecutor (stub mode) as shown below:
    from cleveragents.application.services.plan_lifecycle_service import PlanLifecycleService
    from cleveragents.application.services.plan_executor import PlanExecutor
    from cleveragents.application.services.plan_resume_service import PlanResumeService
    from cleveragents.config.settings import Settings
    from cleveragents.domain.models.core.plan import ProjectLink
    
    svc = PlanLifecycleService(settings=Settings())
    svc.create_action(
        name='local/test-action',
        description='desc',
        definition_of_done='Step 1
    

Step 2',
strategy_actor='local/strategy',
execution_actor='local/execute',
)
plan = svc.use_action('local/test-action', [ProjectLink(project_name='local/project')])
plan_id = plan.identity.plan_id

executor = PlanExecutor(lifecycle_service=svc)
executor.run_strategize(plan_id)
svc.execute_plan(plan_id)
executor.run_execute(plan_id)

summary = PlanResumeService(svc).resume_plan(plan_id, dry_run=True)
print(summary)

3. Observe the resume summary and inspect `plan.last_completed_step` / `plan.last_checkpoint_id`.

## Expected Results
Executing a plan should record step checkpoints so that `resume_plan` reports the next actionable step (e.g. `last_completed_step=1` and `total_steps=2` for the example above). The stored metadata should match the "Plan Resume Behavior" section of ADR-006.

## Actual Results
The summary always reports `last_completed_step=-1`, `next_step_index=0`, and `total_steps=0`, and the plan still has `last_checkpoint_id=None`. No checkpoints are ever written.

Console output from the reproduction script:

phase execute state complete
last_completed_step -1
last_checkpoint_id None
plan_id='01KP17857BS7HKZKEQ97W5GA6T' phase='execute' processing_state='complete' last_completed_step=-1 next_step_index=0 total_steps=0 decision_id=None last_checkpoint_id=None sandbox_ref=None


## Additional Notes
- `PlanResumeService.record_step_checkpoint(...)` (src/cleveragents/application/services/plan_resume_service.py:279) is never invoked anywhere in the codebase.
- `PlanExecutor` never updates `Plan.last_completed_step` or `Plan.last_checkpoint_id` (see src/cleveragents/application/services/plan_executor.py, `_run_execute_with_stub` and `_run_execute_with_runtime`).
- Because no component records checkpoints, the resume feature cannot meet the spec requirement to resume after pause/error.

---
**Automated by CleverAgents Bot**
Supervisor: UAT Testing | Agent: uat-tester
## Summary `agents plan resume` never reports any recorded progress because plan execution never writes resume checkpoints. Both `last_completed_step` and `last_checkpoint_id` stay at their defaults, so the resume summary always shows `-1` / `0`, even immediately after running the plan through Strategize and Execute. ## Steps to Reproduce 1. From a Python REPL with the repository on PYTHONPATH, instantiate `PlanLifecycleService` with default settings. 2. Create a simple action and plan, then drive the plan through Strategize and Execute using `PlanExecutor` (stub mode) as shown below: ```python from cleveragents.application.services.plan_lifecycle_service import PlanLifecycleService from cleveragents.application.services.plan_executor import PlanExecutor from cleveragents.application.services.plan_resume_service import PlanResumeService from cleveragents.config.settings import Settings from cleveragents.domain.models.core.plan import ProjectLink svc = PlanLifecycleService(settings=Settings()) svc.create_action( name='local/test-action', description='desc', definition_of_done='Step 1 Step 2', strategy_actor='local/strategy', execution_actor='local/execute', ) plan = svc.use_action('local/test-action', [ProjectLink(project_name='local/project')]) plan_id = plan.identity.plan_id executor = PlanExecutor(lifecycle_service=svc) executor.run_strategize(plan_id) svc.execute_plan(plan_id) executor.run_execute(plan_id) summary = PlanResumeService(svc).resume_plan(plan_id, dry_run=True) print(summary) ``` 3. Observe the resume summary and inspect `plan.last_completed_step` / `plan.last_checkpoint_id`. ## Expected Results Executing a plan should record step checkpoints so that `resume_plan` reports the next actionable step (e.g. `last_completed_step=1` and `total_steps=2` for the example above). The stored metadata should match the "Plan Resume Behavior" section of ADR-006. ## Actual Results The summary always reports `last_completed_step=-1`, `next_step_index=0`, and `total_steps=0`, and the plan still has `last_checkpoint_id=None`. No checkpoints are ever written. Console output from the reproduction script: ``` phase execute state complete last_completed_step -1 last_checkpoint_id None plan_id='01KP17857BS7HKZKEQ97W5GA6T' phase='execute' processing_state='complete' last_completed_step=-1 next_step_index=0 total_steps=0 decision_id=None last_checkpoint_id=None sandbox_ref=None ``` ## Additional Notes - `PlanResumeService.record_step_checkpoint(...)` (src/cleveragents/application/services/plan_resume_service.py:279) is never invoked anywhere in the codebase. - `PlanExecutor` never updates `Plan.last_completed_step` or `Plan.last_checkpoint_id` (see src/cleveragents/application/services/plan_executor.py, `_run_execute_with_stub` and `_run_execute_with_runtime`). - Because no component records checkpoints, the resume feature cannot meet the spec requirement to resume after pause/error. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#7963
No description provided.