Skip to content

feat(project): make Work Item execution durable across sessions and routines - #749

Open
Neonforge98 wants to merge 3 commits into
developfrom
codex/durable-workitem-runs
Open

feat(project): make Work Item execution durable across sessions and routines#749
Neonforge98 wants to merge 3 commits into
developfrom
codex/durable-workitem-runs

Conversation

@Neonforge98

@Neonforge98 Neonforge98 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

Project execution could start work without a durable execution episode tying Work Items, Sessions, Routines, provider turns, and terminal accounting together. Interruptions could also leave runs or routine fires active indefinitely.

Solution

  • adds durable WorkItemRun records, typed failure/retry policy, path locks, and a transactional dispatch outbox
  • routes Project turns, Routines, Discussion wakes, Stage barriers, provider webhooks, and follow-ups through the unified dispatcher
  • keeps Run terminal state separate from Work Item completion
  • supports native and CLI provider harnesses with shared Project context, PM CLI access, skills/rules/hooks, and durable token accounting
  • adds discussion threads, readiness, execution snapshots, subscriptions, typed properties, and Work Item usage/session navigation
  • recovers provider turns interrupted by app restart through bounded Session-resume retries
  • preserves the mode boundary: Project includes build plus PM workflows, while Build remains build-only

Potential risks

  • schema and dispatcher changes touch Work Item execution, session launch/resume, and routine scheduling
  • retry ancestry and startup reconciliation rely on persisted Run/Session identity; tests cover idempotency, attempt limits, and terminal convergence
  • one-time routines disable after firing by design

Validation

  • Rust Run, dispatcher, Routine, bridge, and provider parser tests
  • strict Clippy, TypeScript, ESLint, and targeted UI tests
  • native, Claude CLI, and Codex CLI Project/Build boundary tests
  • dual-instance macOS testing, including mid-turn quit/restart recovery, exact output bytes, usage accounting, Work Item navigation, and a second cold boot

@Neonforge98
Neonforge98 marked this pull request as draft August 9, 2026 07:31
@Harry19081

Copy link
Copy Markdown
Member

CI failed - please check.

@Neonforge98
Neonforge98 force-pushed the codex/durable-workitem-runs branch from 64b09f7 to dc2c5ca Compare August 9, 2026 14:17
@Neonforge98 Neonforge98 changed the title feat(pm): unify durable Work Item execution and collaboration feat(project): make Work Item execution durable across sessions and routines Aug 9, 2026
@Neonforge98
Neonforge98 force-pushed the codex/durable-workitem-runs branch from dc2c5ca to 4041e2c Compare August 9, 2026 14:30
@Neonforge98
Neonforge98 marked this pull request as ready for review August 9, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants