LibreChat/packages/api/src/code
Danny Avila 3ccdd252f9
🪵 fix: Explain Failed Attachment Copies and Subagent Start-Up Failures (#17398)
* 🪵 fix: Explain Failed Attachment Copies and Subagent Start-Up Failures

The attachments .gitignore and import failure warnings logged only a bare
error type: getSafeErrorMetadata reads `status`, which a workspace tool error
does not carry. They now log the request outcome, upstream status and the
worker's error code, never a body or host path. A worker that reports the
folder missing (one that predates LibreChat-AI/code-interpreter#360 on a
root registered by path alone) is reported to the user as needing an update.

A subagent that could not start was logged only as the SDK's `unknown`
resolution cause. The run now passes onSubagentResolutionFailure, which logs
the underlying cause chain (name, code, status, redacted message) and names
an MCP server that needs re-authentication. A detached child thread shows the
SDK's model-facing start-up message instead of a generic failure, and its
failure log carries the task id, resolution cause and a redacted error in
place of the raw stack.

* 🪵 fix: Log Only Trusted Error Text and Recognize the Legacy Missing-Path Reply

- Cause chains keep a message only for errors whose text LibreChat or the SDK
  composes (MCP authentication errors, SubagentResolutionError,
  CodeWorkspaceSelectionError); every other link logs name, code and status.
  Child-thread failures log stack frames without the message line instead of
  redacted error text.
- A retryable MCP refresh or rejection is logged as a sign-in failure a retry
  may clear, not as one that needs re-authentication.
- A worker's missing attachments folder relayed by an older Code API as
  INVALID_PATH "Workspace path does not exist" is also reported as
  unsupported, through the shared isWorkspacePathMissing check.

* 🪵 fix: Log Frames Only From a Verified Stack and Keep OpenID Out of MCP

- Stack frames are read only after the stack's own name: message header, and
  only when that header still matches the error, so a message line shaped
  like a frame is never logged.
- OpenIDReauthRequiredError alone is no longer reported as an MCP sign-in
  failure: model and endpoint headers raise it too.
2026-10-24 08:51:38 +02:00
..
fixtures 🕹️ feat: Run Declared Project Actions on Attached Workers (#15943) 2026-09-14 18:35:33 -04:00
setup 🧑‍✈️ feat: Enroll Machines Through Explicit Browser Approval (#17344) 2026-10-22 16:54:00 +02:00
agent.spec.ts 🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves (#16798) 2026-10-06 07:40:42 -04:00
agent.ts 🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves (#16798) 2026-10-06 07:40:42 -04:00
attachments.spec.ts 🪵 fix: Explain Failed Attachment Copies and Subagent Start-Up Failures (#17398) 2026-10-24 08:51:38 +02:00
attachments.ts 🪵 fix: Explain Failed Attachment Copies and Subagent Start-Up Failures (#17398) 2026-10-24 08:51:38 +02:00
bridge.spec.ts 📎 feat: Copy Chat Attachments into Attached Workspaces (#17376) 2026-10-23 07:37:50 +02:00
bridge.ts 📎 feat: Copy Chat Attachments into Attached Workspaces (#17376) 2026-10-23 07:37:50 +02:00
capabilities.spec.ts 📎 feat: Copy Chat Attachments into Attached Workspaces (#17376) 2026-10-23 07:37:50 +02:00
capabilities.ts 📝 docs: Describe Attached-Workspace Lanes, Sandbox Scratch, and Skill Files in Tool Descriptions (#16702) 2026-10-03 05:23:53 -04:00
command.spec.ts 🎣 feat: Poll Durable Workspace Requests Without Rejoining Admission (#16733) 2026-10-04 13:22:42 -04:00
command.ts 🔗 fix: Detect Pull Request Links in Command Output for Conversation Lanes (#16982) 2026-10-11 23:12:56 +02:00
config.spec.ts ✅ feat: Default Machine Selection and Linked-Worktree Lanes On (#16678) 2026-10-02 20:08:35 -04:00
config.ts 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756) 2026-10-04 22:19:00 -04:00
decision.spec.ts 🧳 feat: Choose Agent-Allowed Machines For New Chats (#16651) 2026-10-02 08:38:14 -04:00
decision.ts 🔀 feat: Show the Conversation Pull Request in the Sidebar List (#16815) 2026-10-07 12:36:57 +02:00
edits.spec.ts 📍 feat: Show the Current Text Where a Missing Workspace Edit Belongs (#16698) 2026-10-03 06:00:22 -04:00
edits.ts 📍 feat: Show the Current Text Where a Missing Workspace Edit Belongs (#16698) 2026-10-03 06:00:22 -04:00
enrollment.spec.ts 🛂 feat: Add Configurable BYOM Enrollment Policy (#15673) 2026-09-06 15:04:43 -04:00
enrollment.ts 🛂 feat: Add Configurable BYOM Enrollment Policy (#15673) 2026-09-06 15:04:43 -04:00
environment.live.spec.ts 🕹️ feat: Run Declared Project Actions on Attached Workers (#15943) 2026-09-14 18:35:33 -04:00
environments.integration.spec.ts 🧳 feat: Choose Agent-Allowed Machines For New Chats (#16651) 2026-10-02 08:38:14 -04:00
environments.ts 🧑‍✈️ feat: Enroll Machines Through Explicit Browser Approval (#17344) 2026-10-22 16:54:00 +02:00
errors.spec.ts 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756) 2026-10-04 22:19:00 -04:00
errors.ts 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756) 2026-10-04 22:19:00 -04:00
http.spec.ts 🗂️ feat: Choose Conversation Checkout Mode (#16679) 2026-10-02 14:41:35 -04:00
http.ts 🗂️ feat: Choose Conversation Checkout Mode (#16679) 2026-10-02 14:41:35 -04:00
index.ts 📎 feat: Copy Chat Attachments into Attached Workspaces (#17376) 2026-10-23 07:37:50 +02:00
inheritance.spec.ts 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756) 2026-10-04 22:19:00 -04:00
inheritance.ts 🧬 fix: Default Subagents to Their Parent's Code Machine and Workspace (#16756) 2026-10-04 22:19:00 -04:00
instructions.spec.ts 🔁 fix: Retry Code API Rate Limits That Reject Before a Workspace Call Starts (#16453) 2026-09-28 15:45:13 -04:00
instructions.ts 🔁 fix: Retry Code API Rate Limits That Reject Before a Workspace Call Starts (#16453) 2026-09-28 15:45:13 -04:00
lane.spec.ts 🪣 feat: Look Up Bitbucket Cloud Pull Requests (#16987) 2026-10-12 07:34:51 +02:00
lane.ts 🪣 feat: Look Up Bitbucket Cloud Pull Requests (#16987) 2026-10-12 07:34:51 +02:00
lifecycle.spec.ts 🧮 fix: Scale Code Environment Reconciliation (#15625) 2026-09-04 22:27:39 -04:00
lifecycle.ts 🧑‍✈️ feat: Enroll Machines Through Explicit Browser Approval (#17344) 2026-10-22 16:54:00 +02:00
limits.ts 🔁 fix: Retry Code API Rate Limits That Reject Before a Workspace Call Starts (#16453) 2026-09-28 15:45:13 -04:00
paths.ts 🪵 fix: Explain Failed Attachment Copies and Subagent Start-Up Failures (#17398) 2026-10-24 08:51:38 +02:00
protocol.ts ✅ feat: Default Machine Selection and Linked-Worktree Lanes On (#16678) 2026-10-02 20:08:35 -04:00
remoteWorkspace.spec.ts 🖋️ feat: Seal Code Environment Choices Per Conversation (#15868) 2026-09-12 20:45:00 -04:00
requests.spec.ts 🎣 feat: Poll Durable Workspace Requests Without Rejoining Admission (#16733) 2026-10-04 13:22:42 -04:00
requests.ts 🎣 feat: Poll Durable Workspace Requests Without Rejoining Admission (#16733) 2026-10-04 13:22:42 -04:00
settings.spec.ts 🕹️ feat: Configure BYOM Tool Permissions (#15504) 2026-09-02 10:38:00 -04:00
settings.ts 🕹️ feat: Configure BYOM Tool Permissions (#15504) 2026-09-02 10:38:00 -04:00
setup.registry.integration.spec.ts 🧑‍✈️ feat: Enroll Machines Through Explicit Browser Approval (#17344) 2026-10-22 16:54:00 +02:00
targets.integration.spec.ts 🚕 feat: Add Per-Call Subagent Machine Selection (#16757) 2026-10-05 06:21:15 -04:00
targets.spec.ts 🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves (#16798) 2026-10-06 07:40:42 -04:00
targets.ts 🏝️ fix: Apply the No-Workspace Decision Wherever an Agent's Code Route Resolves (#16798) 2026-10-06 07:40:42 -04:00
workspace.lanes.spec.ts 🛤️ feat: Route Linked Worktree Requests into Per-Worktree Lanes (#16477) 2026-09-29 08:13:05 -04:00
workspace.spec.ts 🌿 feat: Accept Lane Git State and Pull Request Contract- #16792 (#16792) 2026-10-06 00:02:25 +02:00
workspace.ts 📎 feat: Copy Chat Attachments into Attached Workspaces (#17376) 2026-10-23 07:37:50 +02:00