Epic: Subplans & Parallelism #368
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#389 Legendary: Context Intelligence & Scaling (M5)
cleveragents/cleveragents-core
#184 feat(subplan): execute and merge subplans
cleveragents/cleveragents-core
#183 feat(sandbox): add checkpoint and rollback hooks
cleveragents/cleveragents-core
#186 feat(plan): add error recovery patterns and CLI hints
cleveragents/cleveragents-core
#187 test(e2e): add M4 correction + subplan suites
cleveragents/cleveragents-core
#198 feat(actor): add plan_subplan tool and decision emission
cleveragents/cleveragents-core
#197 feat(service): add subplan service and spawn workflow
cleveragents/cleveragents-core
#199 feat(plan): add multi-project subplan support
cleveragents/cleveragents-core
#307 feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening
cleveragents/cleveragents-core
#309 Stage E1: Subplan Model
cleveragents/cleveragents-core
#308 Traceability: Updated E1.domain commit message to match git log entry (no history rewrite required).
cleveragents/cleveragents-core
#310 test(domain): add subplan model suites
cleveragents/cleveragents-core
#822 bug(plan): checkpoint rollback is simulated — does not execute real git reset
cleveragents/cleveragents-core
#823 bug(plan): subplan spawn creates metadata but does not orchestrate real child plan execution
cleveragents/cleveragents-core
#1207 feat(actors): wire LLM strategize/execute actors to subplan spawning infrastructure
cleveragents/cleveragents-core
#2061 UAT:
SubplanService.spawn() does not inherit automation profile from parent plan to child plans
cleveragents/cleveragents-core
#2073 Bug:
SubplanService.spawn() copies parent definition_of_done to child plans instead of using spawn entry goal
cleveragents/cleveragents-core
#2074 UAT:
ExecutionMode.DEPENDENCY_ORDERED is not defined in the specification — undocumented third execution mode added to implementation
cleveragents/cleveragents-core
#2145 TDD:
NamespacedName.validate_namespace() and validate_name() in plan.py allow names starting with digits — spec requires names to start with a letter
cleveragents/cleveragents-core
#2147 UAT:
NamespacedName.validate_namespace() and validate_name() in plan.py allow names starting with digits — spec requires names to start with a letter
cleveragents/cleveragents-core
#2380 bug(plan):
Plan.can_revert_to() incorrectly rejects STRATEGIZE → STRATEGIZE reversion — errored Strategize plans cannot be restarted
cleveragents/cleveragents-core
#2392 UAT:
PlanLifecycleService.use_action() stores action invariants as InvariantSource.ACTION instead of promoting them to InvariantSource.PLAN — runtime sees four-tier chain instead of spec-required three-tier
cleveragents/cleveragents-core
#2454 UAT:
agents plan rollback changes_reverted field is a flat list of path strings instead of spec-required {file, action} objects
cleveragents/cleveragents-core
#2864 UAT:
Plan.reversion_count, last_completed_step, and last_checkpoint_id are not persisted to the database — plan resume and reversion limits fail after restart
cleveragents/cleveragents-core
#2870 UAT:
Plan.subplan_statuses and Plan.subplan_config are not persisted to the database — subplan orchestration state is lost on restart
cleveragents/cleveragents-core
#3144 UAT:
agents plan rollback JSON output format does not match spec — multiple field name mismatches and missing fields
cleveragents/cleveragents-core
#3171 UAT:
SubplanService.validate_spawn incorrectly rejects spawning more subplans than max_parallel — should only limit concurrency
cleveragents/cleveragents-core
#3218 bug(checkpoint):
agents plan rollback does not reset plan processing state to execute/queued after sandbox rollback
cleveragents/cleveragents-core
#3270 UAT:
SubplanExecutionService silently swallows MergeConflictError — merge conflicts from parallel subplan results are never surfaced to the user
cleveragents/cleveragents-core
#3274 refactor(agents): extract _create_initial_state and _get_config helpers to eliminate duplicate invocation setup in PlanGenerationGraph and AutoDebugAgent
cleveragents/cleveragents-core
#3326 UAT:
agents plan rollback does not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted
cleveragents/cleveragents-core
#3327 TDD: UAT:
agents plan rollback does not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted
cleveragents/cleveragents-core
#3438 UAT:
system/create_checkpoint built-in tool missing — actors cannot manually create checkpoints
cleveragents/cleveragents-core
#3439 UAT: Automatic checkpoint triggers not implemented — only pre/post execute checkpoints created, not per-tool-write or event-based
cleveragents/cleveragents-core
#3443 UAT:
agents plan rollback confirmation prompt missing checkpoint label, creation time, and side effects count
cleveragents/cleveragents-core
#3445 UAT:
agents plan rollback Rich output format doesn't match spec — missing panels, checkpoint label, side effects, and actor state
cleveragents/cleveragents-core
#3561 UAT:
PlanExecutor has no subplan spawning integration — child plans are never spawned during Execute phase
cleveragents/cleveragents-core
#3563 UAT:
SkeletonCompressor is stored but never invoked in ContextAssembler.assemble() — context inheritance to child plans is broken
cleveragents/cleveragents-core
#3567 bug(subplan):
SubplanService.validate_spawn incorrectly rejects spawn requests where total entries exceed max_parallel — max_parallel is a concurrency cap, not a total spawn cap
cleveragents/cleveragents-core
#3725 BUG: [concurrency] Potential for Race Conditions in
_tell_streaming
cleveragents/cleveragents-core
#3749 UAT: SubplanService.spawn() generates duplicate child plan names when spawning multiple subplans in rapid succession
cleveragents/cleveragents-core
#3754 UAT: Forbidden # type: ignore comments present in decomposition_service.py and decomposition_clustering.py
cleveragents/cleveragents-core
#3819 UAT:
RuntimeExecuteActor.execute() records stub invocations instead of dispatching real tool calls based on decision content
cleveragents/cleveragents-core
#3935 UAT:
ReactiveEventBus documented as single-threaded but used as a Singleton in multi-threaded context — race condition risk
cleveragents/cleveragents-core
#3943 UAT:
SubplanExecutionService._execute_with_timeout creates a new ThreadPoolExecutor per subplan call and leaks threads on timeout
cleveragents/cleveragents-core
#3956 UAT:
SubplanService.spawn() does not inherit automation_profile from parent plan — child plans execute without automation behavior context
cleveragents/cleveragents-core
#3959 UAT:
SubplanService.spawn() does not inherit execution_environment and execution_env_priority from parent plan — child plans may run in wrong environment
cleveragents/cleveragents-core
#4001 UAT:
SubplanFailureHandler.should_retry() silently ignores retry_failed=True for unknown error types — unknown errors are never retried
cleveragents/cleveragents-core
#4005 UAT:
SubplanMergeService only supports file-content merging — spec requires resource-type-aware merge strategies (databases, APIs, etc.)
cleveragents/cleveragents-core
#4010 UAT:
SubplanExecutionService._record_attempt() always sets was_retried=True — final failed attempt incorrectly reports a subsequent retry occurred
cleveragents/cleveragents-core
#4027 UAT:
ServiceRetryWiring and ErrorRecoveryService are implemented but not wired into the DI container — retry policies and error recovery are never applied at runtime
cleveragents/cleveragents-core
#4030 UAT:
retry_auto_debug decorator and RetryContext context manager are dead code — defined but never used in production code
cleveragents/cleveragents-core
#4032 UAT:
ErrorPatternService (Layer 4 Predictive Error Prevention) is not wired into the DI container — predictive guidance is never injected before plan execution
cleveragents/cleveragents-core
#4036 UAT:
PlanExecutor._run_execute_with_stub() overwrites plan.error_details on failure — erases structured error recovery metadata written by ErrorRecoveryService
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#368
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Covers subplan model, service, execution, merge, checkpoint/rollback hooks, error recovery, and multi-project subplan support.
Expected Behavior
Subplans are modeled, created via service, executed in parallel, and merged back into parent plans. Checkpoint/rollback hooks enable safe recovery, error recovery handles failures gracefully, and multi-project support allows subplans across project boundaries.
Child Issues
Definition of Done
This Epic is complete when all child issues are closed and merged. Subplans execute and merge correctly.
New child issue tracked: #1271 — BUG-HUNT: [boundary] Off-by-one error in subplan retry logic
An off-by-one bug has been discovered in
SubplanFailureHandler.should_retry(plan.py:1258). The conditionstatus.attempt_number > config.max_retriesshould be>=, causing subplans to be retried one extra time beyondmax_retries. This child issue has been added to this Epic for tracking.SubplanService.spawn()does not inherit automation profile from parent plan to child plans #2061SubplanService.spawn()does not inherit automation profile from parent plan to child plans #2061SubplanService.spawn()does not inherit automation profile from parent plan to child plansSubplanService.spawn()copies parentdefinition_of_doneto child plans instead of using spawn entry goal #2073ExecutionMode.DEPENDENCY_ORDEREDis not defined in the specification — undocumented third execution mode added to implementation #2074SubplanService.spawn()copies parentdefinition_of_doneto child plans instead of using spawn entry goalExecutionMode.DEPENDENCY_ORDEREDis not defined in the specification — undocumented third execution mode added to implementationNamespacedName.validate_namespace()andvalidate_name()inplan.pyallow names starting with digits — spec requires names to start with a letter #2145NamespacedName.validate_namespace()andvalidate_name()inplan.pyallow names starting with digits — spec requires names to start with a letter #2147NamespacedName.validate_namespace()andvalidate_name()inplan.pyallow names starting with digits — spec requires names to start with a letterNamespacedName.validate_namespace()andvalidate_name()inplan.pyallow names starting with digits — spec requires names to start with a letterNamespacedName.validate_namespace()andvalidate_name()inplan.pyallow names starting with digits — spec requires names to start with a letter #2147Plan.can_revert_to()incorrectly rejectsSTRATEGIZE → STRATEGIZEreversion — errored Strategize plans cannot be restarted #2380Plan.can_revert_to()incorrectly rejectsSTRATEGIZE → STRATEGIZEreversion — errored Strategize plans cannot be restartedPlanLifecycleService.use_action()stores action invariants asInvariantSource.ACTIONinstead of promoting them toInvariantSource.PLAN— runtime sees four-tier chain instead of spec-required three-tier #2392PlanLifecycleService.use_action()stores action invariants asInvariantSource.ACTIONinstead of promoting them toInvariantSource.PLAN— runtime sees four-tier chain instead of spec-required three-tierPlanLifecycleService.use_action()stores action invariants asInvariantSource.ACTIONinstead of promoting them toInvariantSource.PLAN— runtime sees four-tier chain instead of spec-required three-tier #2392agents plan rollbackchanges_revertedfield is a flat list of path strings instead of spec-required{file, action}objects #2454agents plan rollbackchanges_revertedfield is a flat list of path strings instead of spec-required{file, action}objectsPlan.reversion_count,last_completed_step, andlast_checkpoint_idare not persisted to the database — plan resume and reversion limits fail after restart #2864Plan.reversion_count,last_completed_step, andlast_checkpoint_idare not persisted to the database — plan resume and reversion limits fail after restartfreemo referenced this issue2026-04-04 21:14:30 +00:00
Plan.subplan_statusesandPlan.subplan_configare not persisted to the database — subplan orchestration state is lost on restart #2870Plan.subplan_statusesandPlan.subplan_configare not persisted to the database — subplan orchestration state is lost on restartPlan.subplan_statusesandPlan.subplan_configare not persisted to the database — subplan orchestration state is lost on restart #2870agents plan rollbackJSON output format does not match spec — multiple field name mismatches and missing fields #3144agents plan rollbackJSON output format does not match spec — multiple field name mismatches and missing fieldsagents plan rollbackJSON output format does not match spec — multiple field name mismatches and missing fields #3144SubplanService.validate_spawnincorrectly rejects spawning more subplans thanmax_parallel— should only limit concurrency #3171SubplanService.validate_spawnincorrectly rejects spawning more subplans thanmax_parallel— should only limit concurrencySubplanService.validate_spawnincorrectly rejects spawning more subplans thanmax_parallel— should only limit concurrency #3171agents plan rollbackdoes not reset plan processing state toexecute/queuedafter sandbox rollback #3218agents plan rollbackdoes not reset plan processing state toexecute/queuedafter sandbox rollbackSubplanExecutionServicesilently swallowsMergeConflictError— merge conflicts from parallel subplan results are never surfaced to the user #3270SubplanExecutionServicesilently swallowsMergeConflictError— merge conflicts from parallel subplan results are never surfaced to the userSubplanExecutionServicesilently swallowsMergeConflictError— merge conflicts from parallel subplan results are never surfaced to the user #3270agents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted #3326agents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted #3327agents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is revertedagents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is revertedagents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted #3326agents plan rollbackdoes not discard decisions or invalidate child plans after checkpoint — only filesystem is reverted #3327freemo referenced this issue2026-04-05 16:50:16 +00:00
system/create_checkpointbuilt-in tool missing — actors cannot manually create checkpoints #3438system/create_checkpointbuilt-in tool missing — actors cannot manually create checkpointsagents plan rollbackconfirmation prompt missing checkpoint label, creation time, and side effects count #3443agents plan rollbackRich output format doesn't match spec — missing panels, checkpoint label, side effects, and actor state #3445system/create_checkpointbuilt-in tool missing — actors cannot manually create checkpoints #3438agents plan rollbackRich output format doesn't match spec — missing panels, checkpoint label, side effects, and actor state #3445agents plan rollbackconfirmation prompt missing checkpoint label, creation time, and side effects count #3443agents plan rollbackRich output format doesn't match spec — missing panels, checkpoint label, side effects, and actor stateagents plan rollbackconfirmation prompt missing checkpoint label, creation time, and side effects countPlanExecutorhas no subplan spawning integration — child plans are never spawned during Execute phase #3561PlanExecutorhas no subplan spawning integration — child plans are never spawned during Execute phasePlanExecutorhas no subplan spawning integration — child plans are never spawned during Execute phase #3561SkeletonCompressoris stored but never invoked inContextAssembler.assemble()— context inheritance to child plans is broken #3563SkeletonCompressoris stored but never invoked inContextAssembler.assemble()— context inheritance to child plans is brokenSkeletonCompressoris stored but never invoked inContextAssembler.assemble()— context inheritance to child plans is broken #3563SubplanService.validate_spawnincorrectly rejects spawn requests where total entries exceedmax_parallel—max_parallelis a concurrency cap, not a total spawn cap #3567SubplanService.validate_spawnincorrectly rejects spawn requests where total entries exceedmax_parallel—max_parallelis a concurrency cap, not a total spawn capSubplanService.validate_spawnincorrectly rejects spawn requests where total entries exceedmax_parallel—max_parallelis a concurrency cap, not a total spawn cap #3567_tell_streaming#3725_tell_streaming_execute_output_dict#3739RuntimeExecuteActor.execute()records stub invocations instead of dispatching real tool calls based on decision content #3819RuntimeExecuteActor.execute()records stub invocations instead of dispatching real tool calls based on decision contentReactiveEventBusdocumented as single-threaded but used as a Singleton in multi-threaded context — race condition risk #3935ReactiveEventBusdocumented as single-threaded but used as a Singleton in multi-threaded context — race condition riskSubplanExecutionService._execute_with_timeoutcreates a newThreadPoolExecutorper subplan call and leaks threads on timeout #3943SubplanExecutionService._execute_with_timeoutcreates a newThreadPoolExecutorper subplan call and leaks threads on timeoutSubplanService.spawn()does not inheritautomation_profilefrom parent plan — child plans execute without automation behavior context #3956SubplanService.spawn()does not inheritautomation_profilefrom parent plan — child plans execute without automation behavior contextSubplanService.spawn()does not inheritexecution_environmentandexecution_env_priorityfrom parent plan — child plans may run in wrong environment #3959SubplanService.spawn()does not inheritexecution_environmentandexecution_env_priorityfrom parent plan — child plans may run in wrong environmentSubplanFailureHandler.should_retry()silently ignoresretry_failed=Truefor unknown error types — unknown errors are never retried #4001SubplanFailureHandler.should_retry()silently ignoresretry_failed=Truefor unknown error types — unknown errors are never retriedSubplanMergeServiceonly supports file-content merging — spec requires resource-type-aware merge strategies (databases, APIs, etc.) #4005SubplanMergeServiceonly supports file-content merging — spec requires resource-type-aware merge strategies (databases, APIs, etc.)SubplanExecutionService._record_attempt()always setswas_retried=True— final failed attempt incorrectly reports a subsequent retry occurred #4010SubplanExecutionService._record_attempt()always setswas_retried=True— final failed attempt incorrectly reports a subsequent retry occurredServiceRetryWiringandErrorRecoveryServiceare implemented but not wired into the DI container — retry policies and error recovery are never applied at runtime #4027ServiceRetryWiringandErrorRecoveryServiceare implemented but not wired into the DI container — retry policies and error recovery are never applied at runtimeretry_auto_debugdecorator andRetryContextcontext manager are dead code — defined but never used in production code #4030retry_auto_debugdecorator andRetryContextcontext manager are dead code — defined but never used in production codeErrorPatternService(Layer 4 Predictive Error Prevention) is not wired into the DI container — predictive guidance is never injected before plan execution #4032ErrorPatternService(Layer 4 Predictive Error Prevention) is not wired into the DI container — predictive guidance is never injected before plan executionPlanExecutor._run_execute_with_stub()overwritesplan.error_detailson failure — erases structured error recovery metadata written byErrorRecoveryService#4036agents action createCLI silently drops invariants, automation_profile, and optional actors (review_actor, estimation_actor, invariant_actor) from YAML config #4037PlanExecutor._run_execute_with_stub()overwritesplan.error_detailson failure — erases structured error recovery metadata written byErrorRecoveryServiceagents action createCLI silently drops invariants, automation_profile, and optional actors (review_actor, estimation_actor, invariant_actor) from YAML configPlanLifecycleService.create_actionmissingapply_actorandinputs_schemaparameters — fields defined in YAML schema cannot be persisted #4039PlanLifecycleService.create_actionmissingapply_actorandinputs_schemaparameters — fields defined in YAML schema cannot be persisted