[BUG] Cowork: EINVAL error on every second prompt due to stale oneshot session mount

Resolved 💬 3 comments Opened May 20, 2026 by gopher-everitt Closed May 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗