📡 fix: Expose Safe Subagent Startup Diagnostics - #592
Conversation
|
Head: Adds host-visible startup diagnostics, closed safe cause mapping, typed detached failures, and version 4.0.2. Passed 332 tests across 11 focused suites, TypeScript, touched-file ESLint/import order, package build, and circular-dependency checks. SDK-only; LibreChat logging and live workspace reproduction follow. |
|
Independent review complete for Local verification passed: 332 subagent tests, 203 tracing tests, TypeScript, touched-file ESLint/import order, build, circular dependencies, and CJS/ESM exports. CI passed except Anthropic summarization still running. Not verified here: LibreChat logger integration or live quarantined/offline workspace reproduction. Production root cause remains unconfirmed. Version 4.0.2 is proposed, not published. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d99f1dcf6
ℹ️ 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".
|
Head: Fixes Codex P2 C1: preserve the resumed child run and branch thread in startup diagnostics. Four new checkpoint-resume regressions; 539 subagent/tracing tests passed. Typecheck/package checks and CI are running. Independent review started for this exact head. |
|
Head: Addresses P2 C1 and the independent review’s P2 C2 through the identity-preparation invariant. Diagnostics retain the attempted child identity without binding or persisting it early. Expanded coverage includes manifest-free forks, aborts, invalidation, retries, and replacement-record isolation. Focused tests, TypeScript, touched-file ESLint/import order, build, circular dependencies, CI, and independent review are running for this exact head. |
|
Head: Fixes P2 C3: route graph replay-preparation failures through the same safe diagnostic and parent-message boundary. Settlement identity failures also retain safe typed errors. Framework interrupts, stream limits, and cancellation remain distinct from ordinary startup failures. Passed 50 focused diagnostic/identity tests, including real Run/graph preflight paths. Expanded replay-consumer regressions, TypeScript, touched-file ESLint/import order, build, circular dependencies, CI, and independent review are running for this exact head. P2 C1 and C2 remain fixed. |
|
Head: Fixes P2 C4: retain the selected persisted identity before checkpoint enumeration can reject. Recording remains diagnostic-only; identical identity attempts reuse the frozen metadata. Added enumeration-failure regressions for direct execution and graph replay. Passed 52 focused diagnostic/identity tests. Full focused regressions, TypeScript, touched-file lint/import order, build, circular dependencies, CI, and independent review are running for this exact head. C1–C3 remain fixed. |
|
Independent review complete for Passed: 608 tests across 26 focused suites, TypeScript, touched-file lint/import order, build, circular dependencies, and built CJS/ESM diagnostics smoke checks. All CI jobs passed. Codex thread resolved. SDK 4.0.2 remains proposed, not published. LibreChat logging integration and live workspace reproduction were not run; production causality remains unconfirmed. |
|
@codex review the latest head, final review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Subagent identity and lazy-config failures only reached
console.warn; detached execution then discarded their classification. Hosts could neither retain the startup cause nor safely explain it to the parent.onSubagentResolutionFailureto Run/graph inputs andonResolutionFailureto direct executors. Forward it to detached and nested children.SubagentResolutionError. Keep safe console fallback when the hook is absent or throws.@librechat/agentsfrom 4.0.1 to 4.0.2.Verification
Passed on the latest head: 608 tests across 26 focused subagent, replay-consumer, and tracing suites,
npx tsc --noEmit, touched-file ESLint/import order,npm run build,npm run check:circular-deps, and CJS/ESM public-export smoke checks.New tests cover both resolution phases, every cause and unknown fallback, aborts, detached delivery, Run/graph plumbing, malicious error properties, invalid classifications, and secret/stack redaction.
Follow-up
SDK first. LibreChat must map its error classes, log through Winston with conversation context, recognize the typed detached failure, and reproduce quarantined/offline workspace startup. This PR does not establish the cause of the October 2 production failures or publish the package.
Review Follow-up
C1, P2: preserve resumed-child correlation. Fixed in
fa98261e6326a9c40d45fec6b134b09fa34c3bdaand carried forward.C2, P2: retain attempted identity for manifest-free forks, aborts, and invalidation without committing or persisting it early. Fixed in
65b7a4dd4f4b8de9e1a3c1befe5880b975798f25; enumeration window completed in08ddabb8d1ef0df8122775d7fbc15e4d3a028c6c.C3, P2: diagnose replay preparation before tool invocation and return safe parent errors. Cover all resolution entry points, settlement, control flow, and redaction. Fixed in
fea72f26f9d8dd75b8bcb88507f6b44a7630f1f1.C4, P2: capture selected identity before checkpoint enumeration rejects. Cover direct execution and replay without early binding; identical captures reuse frozen metadata. Fixed in
08ddabb8d1ef0df8122775d7fbc15e4d3a028c6c.The latest head passed 608 tests across 26 focused suites, TypeScript, touched-file ESLint/import order, build, circular dependencies, and CJS/ESM Run/graph preflight smoke checks. Independent review completed with no new findings for
08ddabb8d1ef0df8122775d7fbc15e4d3a028c6c; C1–C4 are fixed, with no open or rejected findings. All CI jobs passed.