Cowork scheduled tasks: SKILL.md with CRLF line endings causes empty description and update_scheduled_task parse failure

Resolved 💬 5 comments Opened Mar 21, 2026 by jmylot Closed May 16, 2026

## Summary

When a SKILL.md file for a Cowork scheduled task is written with CRLF line endings (Windows-style), the Cowork scheduled task YAML frontmatter parser fails silently, causing two symptoms:

  1. list_scheduled_tasks returns an empty description even though the SKILL.md frontmatter contains a valid description field.
  2. update_scheduled_task with description or prompt fields fails with "Could not parse task file: unexpected format" — while cronExpression updates on the same task succeed.

Environment

  • OS: Windows 11 Pro
  • Claude Desktop: Latest (Cowork mode / scheduled tasks)
  • Affected MCP tools: mcp__scheduled-tasks__list_scheduled_tasks, mcp__scheduled-tasks__update_scheduled_task
  • Root cause: SKILL.md written via Windows MCP FileSystem write mode uses CRLF (\r\n) line endings; Cowork YAML parser requires LF (\n) only

Steps to Reproduce

  1. Create a scheduled task with create_scheduled_task (succeeds — SKILL.md created with LF).
  2. Edit the resulting SKILL.md using the Windows MCP FileSystem write mode — this writes CRLF line endings on Windows.
  3. Call list_scheduled_tasks → the task's description field returns empty string, even though the SKILL.md frontmatter is syntactically valid YAML.
  4. Call update_scheduled_task with description: "some text" → returns error: "Could not parse task file: unexpected format".
  5. Call update_scheduled_task with cronExpression: "0 5 * * *"succeeds (only modifies scheduled-tasks.json, does not re-parse SKILL.md).

Diagnosis

Comparing first bytes of a working vs. broken SKILL.md:

  • Working (LF): 2D 2D 2D 0A (---\n)
  • Broken (CRLF): 2D 2D 2D 0D (---\r) followed by 0A

The YAML frontmatter parser appears to treat \r as an unexpected character, causing a silent parse failure. Removing notifySessionId from scheduled-tasks.json was not sufficient — only converting the SKILL.md to LF resolved the issue.

Expected Behavior

One or more of the following:

  • The YAML frontmatter parser should accept both LF and CRLF (YAML 1.2 spec allows both)
  • update_scheduled_task error message should hint at the root cause (e.g., "SKILL.md line endings must be LF")
  • Windows MCP FileSystem write tool should produce LF line endings when writing files in the Scheduled tasks directory, consistent with create_scheduled_task

Workaround

Write SKILL.md using PowerShell with explicit LF encoding:

$utf8NoBom = New-Object System.Text.UTF8Encoding $false
$content = $content -replace "`r`n", "`n"
[System.IO.File]::WriteAllText($skillPath, $content, $utf8NoBom)

Related

  • Issue #36491 (separate bug: UTF-8 corruption in .md files) — same environment

View original on GitHub ↗

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