📡 fix: Expose Safe Subagent Startup Diagnostics - #592
lia-by-librechat[bot] wants to merge 1 commit into
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".
| childRunId: | ||
| execution.identity?.childRunId ?? execution.address.currentChildRunId, | ||
| childThreadId: | ||
| execution.identity?.childThreadId ?? | ||
| execution.address.baseChildThreadId, |
There was a problem hiding this comment.
Preserve resumed child identity in failure diagnostics
When a reconstructed HITL execution fails while prepareCheckpointFork is resolving its identity, execution.identity has not yet been bound, but createChildExecutionIdentity is already operating on resumeExecution.childRunId and branchChildThreadId. These fallbacks instead report a newly derived run ID and the base thread ID, so the new callback gives hosts incorrect correlation IDs precisely for startup failures on resumed children. Use the resume execution and branch address when selecting the unresolved identity.
Useful? React with 👍 / 👎.
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: 332 subagent regression tests, 203 tracing tests,
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.