feat(workflows): inspect completed runs from resume - #1758
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
flora131
force-pushed
the
feat/1532-completed-workflow-resume
branch
from
July 13, 2026 03:42
b5362a6 to
4ac93e7
Compare
Collaborator
Author
Verified proofRebased onto latest
Tmux-captured inline behavior: |
Assistant-model: GPT-5.6 Sol
Assistant-model: GPT-5.6 Sol
flora131
force-pushed
the
feat/1532-completed-workflow-resume
branch
from
July 13, 2026 22:13
4ac93e7 to
e47a6fb
Compare
flora131
added a commit
that referenced
this pull request
Jul 15, 2026
…replay, and send Generalize the completed-workflow-inspection detached-handle pattern (#1758) into a shared post-mortem stage-chat resolver so any eligible terminal agent stage with a valid retained Atomic session reopens as an interactive follow-up conversation — not only completed-inspection, but also generic /workflow attach and /workflow connect, restored/replayed durable snapshots after a process restart, and workflow send. Adds ensurePostMortemStageHandle: reuses an existing non-disposed handle, validates the retained sessionFile is an existing readable context-bearing transcript, and lazily reopens it through a detached, single-flight StageControlRegistry.getOrCreateDetached handle keyed by the real runId/stageId. Follow-ups append in place; run/stage status, results, timings, checkpoints, replay metadata, and graph topology stay immutable, and post-mortem chat can never resume/retry/rewind/pause/re-dispatch execution. Stages without a valid retained agent session keep the read-only transcript; recoverably failed stages keep execution-resume semantics. Refs: #1811 Assistant-model: Claude Opus 4.8
flora131
added a commit
that referenced
this pull request
Jul 15, 2026
…replay, and send (#1811) (#1813) * feat(workflows): unify post-mortem stage chat across attach, restore/replay, and send Generalize the completed-workflow-inspection detached-handle pattern (#1758) into a shared post-mortem stage-chat resolver so any eligible terminal agent stage with a valid retained Atomic session reopens as an interactive follow-up conversation — not only completed-inspection, but also generic /workflow attach and /workflow connect, restored/replayed durable snapshots after a process restart, and workflow send. Adds ensurePostMortemStageHandle: reuses an existing non-disposed handle, validates the retained sessionFile is an existing readable context-bearing transcript, and lazily reopens it through a detached, single-flight StageControlRegistry.getOrCreateDetached handle keyed by the real runId/stageId. Follow-ups append in place; run/stage status, results, timings, checkpoints, replay metadata, and graph topology stay immutable, and post-mortem chat can never resume/retry/rewind/pause/re-dispatch execution. Stages without a valid retained agent session keep the read-only transcript; recoverably failed stages keep execution-resume semantics. Refs: #1811 Assistant-model: Claude Opus 4.8 * fix(workflows): reject post-mortem execution resume Assistant-model: GPT-5.6 Sol * fix(workflows): clarify terminal send delivery Assistant-model: GPT-5.6 Sol * fix(workflows): queue terminal auto sends Route automatic delivery on a streaming post-mortem stage to follow-up instead of rejecting it as an explicit execution steer. Assistant-model: GPT-5.6 Sol * fix(workflows): bypass exact resume catalog scan Resolve exact compatible live workflow IDs before enumerating the completed durable catalog, avoiding unbounded resume latency from unrelated retained runs. Assistant-model: GPT-5.6 Sol * test(workflows): isolate nested attach setup Initialize slash-command resources before seeding the shared workflow store so concurrent test cleanup cannot erase the nested attach fixture during module loading. Assistant-model: GPT-5.6 Sol * fix(workflows): fence post-mortem session boundaries Assistant-model: GPT-5.6 Sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds successful completed workflows to the existing
/workflow resumeexperience. Completed targets appear in the same picker as live and durable resumable runs, use green✓ completedstyling, and open an authoritative read-only workflow snapshot with retained stage-chat follow-up instead of re-dispatching workflow execution.Changes
Acceptance Criteria
✓ completedlabel./resume,atomic -r, and--continueinternal-session behavior is unchanged.Validation
bun run typecheck: passedbun run lint: passedbun run check:file-length: passedgit diff --check: passedFixes #1532
Verified proof
Rebased onto latest
origin/mainand force-pushed with lease.28388b7b6e8a5466d9d36c719ee999ac0fa13d264ac93e720473a28a13bf3966645d1a450924995cdistand a real Node binary.bun run typecheck,bun run lint,bun run check:file-length, andgit diff --check: passed.MERGEABLE/CLEAN.Tmux-captured inline behavior:
Greptile Summary
This PR adds completed workflow inspection to the existing
/workflow resumeflow. The main changes are:Confidence Score: 5/5
Safe to merge with low risk.
No issues were identified in the reviewed changes. The completed inspection path stays separate from durable re-dispatch, validates stale or invalid completed state before opening, and preserves existing live and durable resume behavior.
No files require special attention.
What T-Rex did
Important Files Changed
/workflow resumetargets between durable resume and completed inspection, including mixed catalog formatting and ambiguity handling.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant User participant Command as /workflow resume participant Runtime participant Backend as Durable Backend participant Selector as Mixed Selector participant Store participant Overlay User->>Command: /workflow resume [id-or-prefix] Command->>Runtime: prepare durable resumable + completed catalogs Runtime->>Backend: hydrate/list resumable and completed handles Backend-->>Runtime: live durable rows + openable completed rows Runtime-->>Command: mixed resume catalog alt no explicit target Command->>Selector: open live + durable + completed picker Selector-->>Command: selected live/durable/completed target end alt durable resumable target Command->>Runtime: resumeDurableWorkflow(id) Runtime->>Backend: mark running and replay checkpoints Runtime-->>Command: resumed run id Command->>Overlay: open resumed workflow else completed target Command->>Runtime: openCompletedDurableWorkflow(id) Runtime->>Backend: load authoritative handle + checkpoints Runtime->>Store: record immutable completed snapshot Runtime-->>Command: opened completed run id Command->>Overlay: open read-only detail/chat snapshot end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant User participant Command as /workflow resume participant Runtime participant Backend as Durable Backend participant Selector as Mixed Selector participant Store participant Overlay User->>Command: /workflow resume [id-or-prefix] Command->>Runtime: prepare durable resumable + completed catalogs Runtime->>Backend: hydrate/list resumable and completed handles Backend-->>Runtime: live durable rows + openable completed rows Runtime-->>Command: mixed resume catalog alt no explicit target Command->>Selector: open live + durable + completed picker Selector-->>Command: selected live/durable/completed target end alt durable resumable target Command->>Runtime: resumeDurableWorkflow(id) Runtime->>Backend: mark running and replay checkpoints Runtime-->>Command: resumed run id Command->>Overlay: open resumed workflow else completed target Command->>Runtime: openCompletedDurableWorkflow(id) Runtime->>Backend: load authoritative handle + checkpoints Runtime->>Store: record immutable completed snapshot Runtime-->>Command: opened completed run id Command->>Overlay: open read-only detail/chat snapshot endReviews (4): Last reviewed commit: "fix(workflows): harden completed resume ..." | Re-trigger Greptile