claude-code - 💡(How to fix) Fix [BUG] Writes Truncated SKILL.md to Disk While Internal Prompt is Complete

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

Actual behavior: The SKILL.md file on disk is truncated mid-content. The internal prompt used by the scheduler is complete and correct — the task runs as expected — but the file on disk ends partway through, often mid-sentence or mid-section, with no error or indication of truncation.

Error Messages/Logs

Fix Action

Fix / Workaround

Workaround: None that doesn't carry risk of disrupting the working internal prompt. Current recommendation is to leave the task untouched and treat the SKILL.md file as unreliable.

Code Example

**How the discrepancy was confirmed:**

- A scheduled task (weekly pipeline audit) ran correctly, executing all agreed-upon workflow steps
- The corresponding SKILL.md file on disk ended at line 92 of what should have been ~300+ lines
- Diagnostic analysis based on the truncated file incorrectly concluded that multiple workflow steps were missing
- The task's actual run proved the internal prompt was complete
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?

Product: Cowork (desktop, Windows) Version: Current as of May 2026 Severity: Medium — no data loss, but causes persistent incorrect state and wastes significant user time

Issue 2: update_scheduled_task Writes Truncated SKILL.md to Disk While Internal Prompt is Complete

What Should Happen?

Expected behavior: The SKILL.md file on disk matches the prompt stored internally and used when the task runs.

Actual behavior: The SKILL.md file on disk is truncated mid-content. The internal prompt used by the scheduler is complete and correct — the task runs as expected — but the file on disk ends partway through, often mid-sentence or mid-section, with no error or indication of truncation.

Error Messages/Logs

**How the discrepancy was confirmed:**

- A scheduled task (weekly pipeline audit) ran correctly, executing all agreed-upon workflow steps
- The corresponding SKILL.md file on disk ended at line 92 of what should have been ~300+ lines
- Diagnostic analysis based on the truncated file incorrectly concluded that multiple workflow steps were missing
- The task's actual run proved the internal prompt was complete

Steps to Reproduce

Steps to reproduce:

  1. Update a scheduled task's prompt using the update_scheduled_task tool
  2. In a later session, read the task's SKILL.md file from disk (e.g., via the Read tool or by opening the file directly)

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.7196.0 (2dbd78)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Impact:

The truncated file becomes a permanently misleading reference. Future sessions that read the file to audit, debug, or update the task will produce incorrect conclusions. The .scheduled folder is also mounted read-only, so the only path to correct the on-disk file is through the same tool that caused the truncation — creating a circular dependency with risk of overwriting a working internal prompt.

Workaround: None that doesn't carry risk of disrupting the working internal prompt. Current recommendation is to leave the task untouched and treat the SKILL.md file as unreliable.

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

claude-code - 💡(How to fix) Fix [BUG] Writes Truncated SKILL.md to Disk While Internal Prompt is Complete