Summary
src/backend/services/process_engine/engine/handlers/agent_task.py calls AgentClient.chat() directly, bypassing TaskExecutionService, SlotService, CapacityManager, cleanup service, and all other orchestration invariants. architecture.md already documents the engine as "OUT OF SCOPE, dormant."
This is the silent exception to every invariant in the Tier 0–2.5 plan. Every hardening PR that ships has a footnote "…except for process engine."
Decision required
Two honest options — sitting between them is the expensive choice:
Option A — Fold agent_task handler through TaskExecutionService
- Process steps inherit slot/timeout/PID/cleanup behaviour automatically.
- Process-engine becomes a specific kind of trigger, not a parallel universe.
- Cost: ~200–400 LOC refactor in the engine handler.
- Risk: process-engine tests may surface drift (the engine has its own observability).
Option B — Delete the process engine
- Code exists but is not actively being developed (per CLAUDE.md and
architecture.md).
feature-flows/process-engine/ docs move to historical/.
- Removes ~several thousand LOC of dormant surface.
- Cost: one PR with a big red diff, plus stakeholder confirmation that no one is using it.
Non-option — status quo
Leaving it as-is means every future invariant (CAPACITY-CONSOLIDATE, CLEANUP-COLLAPSE, #306 push completion) has a silent exception. #291 webhook triggers also can't be designed cleanly until this is resolved.
Parallel to other Tier 2.5 work
This can proceed in parallel with #306 because it's an architectural decision + refactor with no runtime dependency on push completion. Best to resolve before CAPACITY-CONSOLIDATE so the new primitive doesn't have to account for a legacy bypass path.
Decision owner
@vybe — please weigh in on A vs. B. If A, I can scope the refactor. If B, I'd like a confirmation that no live deployment depends on process engine.
Context
See docs/planning/ORCHESTRATION_RELIABILITY_2026-04.md — Tier 2.5 Simplification.
Summary
src/backend/services/process_engine/engine/handlers/agent_task.pycallsAgentClient.chat()directly, bypassingTaskExecutionService,SlotService,CapacityManager, cleanup service, and all other orchestration invariants.architecture.mdalready documents the engine as "OUT OF SCOPE, dormant."This is the silent exception to every invariant in the Tier 0–2.5 plan. Every hardening PR that ships has a footnote "…except for process engine."
Decision required
Two honest options — sitting between them is the expensive choice:
Option A — Fold
agent_taskhandler throughTaskExecutionServiceOption B — Delete the process engine
architecture.md).feature-flows/process-engine/docs move to historical/.Non-option — status quo
Leaving it as-is means every future invariant (CAPACITY-CONSOLIDATE, CLEANUP-COLLAPSE, #306 push completion) has a silent exception. #291 webhook triggers also can't be designed cleanly until this is resolved.
Parallel to other Tier 2.5 work
This can proceed in parallel with #306 because it's an architectural decision + refactor with no runtime dependency on push completion. Best to resolve before CAPACITY-CONSOLIDATE so the new primitive doesn't have to account for a legacy bypass path.
Decision owner
@vybe — please weigh in on A vs. B. If A, I can scope the refactor. If B, I'd like a confirmation that no live deployment depends on process engine.
Context
See
docs/planning/ORCHESTRATION_RELIABILITY_2026-04.md— Tier 2.5 Simplification.