test(sessions): lock down workflow resume filtering - #1746
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
greptile-apps
Bot
dismissed
their stale review
July 12, 2026 09:09
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
greptile-apps
Bot
dismissed
their stale review
July 14, 2026 00:58
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
flora131
force-pushed
the
fix/1715-internal-workflow-session-history
branch
from
July 14, 2026 01:20
fd82c0a to
1fea2bf
Compare
Assistant-model: GPT-5.6 Sol
Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
Assistant-model: GPT-5.6 Sol
Assistant-model: GPT-5.6 Sol
flora131
force-pushed
the
fix/1715-internal-workflow-session-history
branch
from
July 14, 2026 18:39
1fea2bf to
29418c4
Compare
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
Preserves the invariant that workflow-stage sessions remain available to workflow recovery and diagnostics without polluting normal session history. The runtime behavior was already present; this PR closes the remaining regression-coverage and documentation gaps across every user-facing resume surface.
Changes
/resumeatomic -randatomic --resumeatomic -candatomic --continueSessionManager.list,SessionManager.listAll, andSessionManager.continueRecentincludeInternaldiscovery and retained workflow run/stage metadata.SessionManagercreation, listing, continuation, direct-open, and workflow metadata APIs.Acceptance Criteria Coverage
internalwith run/stage linkage by the existing SDK path, covered by the existing SDK session-manager regression./workflow resumesorting or deduplication behavior is changed.Validation
bun run typecheck: passedbun run lint: passedbun run check:file-length: passedgit diff --check: passedFixes #1715
Greptile Summary
This PR tightens workflow-owned session handling across resume and subagent paths. The main changes are:
internal: trueand complete workflow metadata./resume,-r,-c,--continue,SessionManager.list, andSessionManager.listAllsurfaces by default.Confidence Score: 5/5
Safe to merge with minimal risk.
The change is focused on session classification, filtering, and metadata propagation. The updated paths use strict validation helpers and preserve explicit recovery access. Tests cover CLI, interactive, SessionManager, workflow, and subagent behavior.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant WorkflowStage as Workflow stage participant SessionManager as SessionManager participant Subagent as Subagent launcher participant ChildAtomic as Child Atomic process participant Resume as Resume/list surfaces WorkflowStage->>SessionManager: create/open/fork with internal + workflow metadata SessionManager->>SessionManager: validate runId, stageId, stageName WorkflowStage->>Subagent: launch child with orchestration context Subagent->>ChildAtomic: set ATOMIC_WORKFLOW_SESSION_METADATA ChildAtomic->>SessionManager: applyInheritedWorkflowSessionClassification() Resume->>SessionManager: "list/listAll/continueRecent default includeInternal=false" SessionManager-->>Resume: return regular sessions only Resume->>SessionManager: "workflow diagnostics includeInternal=true" SessionManager-->>Resume: return regular + classified workflow sessions%%{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 WorkflowStage as Workflow stage participant SessionManager as SessionManager participant Subagent as Subagent launcher participant ChildAtomic as Child Atomic process participant Resume as Resume/list surfaces WorkflowStage->>SessionManager: create/open/fork with internal + workflow metadata SessionManager->>SessionManager: validate runId, stageId, stageName WorkflowStage->>Subagent: launch child with orchestration context Subagent->>ChildAtomic: set ATOMIC_WORKFLOW_SESSION_METADATA ChildAtomic->>SessionManager: applyInheritedWorkflowSessionClassification() Resume->>SessionManager: "list/listAll/continueRecent default includeInternal=false" SessionManager-->>Resume: return regular sessions only Resume->>SessionManager: "workflow diagnostics includeInternal=true" SessionManager-->>Resume: return regular + classified workflow sessionsReviews (6): Last reviewed commit: "docs(changelog): keep session fixes unre..." | Re-trigger Greptile