Repository navigation
fix(wework): restore Codex failed turns after task reload - #2206
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughCodex failures now persist as structured local assistant messages, merge into missing transcript entries without duplication, propagate error metadata through Wework, and restore error cards and retry actions after task switching or reopening. ChangesCodex failure persistence and restoration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Codex
participant Executor
participant RuntimeHandle
participant Wework
participant User
Codex->>Executor: return failed turn
Executor->>RuntimeHandle: persist failed assistant message
Wework->>Executor: read task transcript
Executor->>RuntimeHandle: merge missing failure by message ID
Executor-->>Wework: return failed message and error metadata
Wework-->>User: render error card and retry action
User->>Wework: click retry
Wework->>Codex: submit retry turn
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What changed
Root cause
Codex can emit a failed terminal event without persisting an assistant item in
thread/read. Wework rebuilds a task transcript from that provider response after switching away or reopening the task, so the failed assistant card disappeared even though the original run had shown the error.Impact
Failed Codex turns now remain visible after task navigation or reload. Users can inspect the original Codex error and retry from the restored failure card.
Validation
WEWORK_E2E_SCREENSHOTS=final node wework/e2e/desktop/task-flow.e2e.mjs --retry-onlycargo test --lib runtime_work::handler::tests(34 passed)cargo test --lib runtime_work::transcript::tests(29 passed)pnpm --dir wework test --run src/features/workbench/runtimePaneMessages.test.ts src/components/layout/runtimeTranscriptMessages.test.ts(36 passed)cargo test --all-features --lib, and ClippySummary by CodeRabbit
Bug Fixes
Tests