Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cddf8ae62
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| filePath: dbPath, | ||
| homeFallback: shouldUseWorkflowDbHomeFallback(), |
There was a problem hiding this comment.
Replay primary run DB before enabling home fallback
Turning on homeFallback at construction time causes relayfile/cloud sessions with a readable-but-read-only workspace DB to switch to $HOME immediately, and JsonFileWorkflowDb only replays the resolved path (loadSnapshot(this.filePath)). In that case, existing runs already stored in .agent-relay/workflow-runs.jsonl are no longer visible, so --resume <runId> can fail with "not found" even though the run state is still present in the original file.
Useful? React with 👍 / 👎.
Summary
WorkflowBuilder.run()and the workflow CLIfile-db.test.tsWhy
Cloud and relayfile-mounted workspaces can make
.agent-relay/workflow-runs.jsonlread-only. The JSONL DB already has a home fallback; the builder and CLI just were not opting into it, so cloud runs lost resume state with EACCES warnings.Validation
npm --prefix packages/sdk run checkcd packages/sdk && npx vitest run src/__tests__/file-db.test.tsSequence
Independent relay-side fix. It complements the cloud filesystem PRs by preserving workflow run state outside the mounted workspace.