claude-code - 💡(How to fix) Fix [BUG] Cowork: EINVAL error on every second prompt due to stale oneshot session mount

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. Error appears immediately: "Failed to resume session: EINVAL: invalid argument, stat '...\local_XXXX.claude\projects...\outputs\YYYY.jsonl'" Claude should run second prompt without error.

Error Messages/Logs

  1. Error appears immediately: "Failed to resume session: EINVAL: invalid argument, stat '...\local_XXXX.claude\projects...\outputs\YYYY.jsonl'"

Code Example

Something went wrong
Try sending your message again. If it keeps happening, share feedback so we can investigate.

Failed to resume session: EINVAL: invalid argument, stat 'C:\Users\julia\AppData\Roaming\Claude\local-agent-mode-sessions\a89de7fa-31d9-4da6-aaeb-6cad18e2132f\fb08ef0b-8ee4-4d81-9b8a-275ad5b1ae77\local_d1dda010-7809-44d5-bd04-a3165f800d01\.claude\projects\C--Users-julia-AppData-Roaming-Claude-local-agent-mode-sessions-a89de7fa-31d9-4da6-aaeb-6cad18e2132f-fb08ef0b-8ee4-4d81-9b8a-275ad5b1ae77-local-d1dda010-7809-44d5-bd04-a3165f800d01-outputs\ac9775d5-1504-4f54-8f52-fe9d77e89718.jsonl'
You can restart the conversation from an earlier message.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Platform: Windows 11 Pro, Claude desktop app v1.7196.0.0 (UWP/sandboxed install)

Reproduction steps:

  1. Start any new Cowork session
  2. Send a first prompt — completes successfully
  3. Send a second prompt in the same session
  4. Error appears immediately: "Failed to resume session: EINVAL: invalid argument, stat '...\local_XXXX.claude\projects...\outputs\YYYY.jsonl'"

From the coworkd guest logs, each tool invocation creates a new oneshot user session (e.g. exciting-beautiful-euler, kind-zealous-lovelace) with a new local_XXXX outputs folder, then tears it down completely after the task. On the second prompt, the app attempts to resume by stat-ing the .jsonl from the previous invocation's local_XXXX folder, but that mount has already been cleaned up, causing EINVAL.

The session resume logic appears to be referencing a file path that is only valid while the previous oneshot mount is live.

<img width="596" height="381" alt="Image" src="https://github.com/user-attachments/assets/5cf48825-261b-4475-95fc-7042d3c345d4" />

What Should Happen?

Claude should run second prompt without error.

Error Messages/Logs

Something went wrong
Try sending your message again. If it keeps happening, share feedback so we can investigate.

Failed to resume session: EINVAL: invalid argument, stat 'C:\Users\julia\AppData\Roaming\Claude\local-agent-mode-sessions\a89de7fa-31d9-4da6-aaeb-6cad18e2132f\fb08ef0b-8ee4-4d81-9b8a-275ad5b1ae77\local_d1dda010-7809-44d5-bd04-a3165f800d01\.claude\projects\C--Users-julia-AppData-Roaming-Claude-local-agent-mode-sessions-a89de7fa-31d9-4da6-aaeb-6cad18e2132f-fb08ef0b-8ee4-4d81-9b8a-275ad5b1ae77-local-d1dda010-7809-44d5-bd04-a3165f800d01-outputs\ac9775d5-1504-4f54-8f52-fe9d77e89718.jsonl'
You can restart the conversation from an earlier message.

Steps to Reproduce

  1. Start any new Cowork session
  2. Send a first prompt — completes successfully
  3. Send a second prompt in the same session
  4. Error appears immediately: "Failed to resume session: EINVAL: invalid argument, stat '...\local_XXXX.claude\projects...\outputs\YYYY.jsonl'"

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code CLI version 2.1.128.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING