Skip to content

fix: catch ENOSPC errors and fix false positive SUCCESS message (Issue #1212)#1213

Open
konard wants to merge 6 commits intomainfrom
issue-1212-f01199b18425
Open

fix: catch ENOSPC errors and fix false positive SUCCESS message (Issue #1212)#1213
konard wants to merge 6 commits intomainfrom
issue-1212-f01199b18425

Conversation

@konard
Copy link
Contributor

@konard konard commented Feb 2, 2026

Summary

Fixes the false positive 🎉 SUCCESS message when disk space runs out during execution. The tool now:

  • Shows ⚠️ PARTIAL SUCCESS when errorDuringExecution is true instead of unconditional 🎉 SUCCESS
  • Detects ENOSPC errors specifically with actionable guidance (e.g., cleanup ~/.claude/debug)
  • Always shows log upload failures to the user (not just in --verbose mode)
  • Checks disk space before attempting log upload operations
  • Detects ENOSPC in Claude Code's error_during_execution errors array using shared isENOSPC() utility

Changes

File Change
src/lib.mjs Add isENOSPC() utility for detecting disk space errors
src/solve.results.lib.mjs Show PARTIAL SUCCESS when errorDuringExecution is true
src/token-sanitization.lib.mjs ENOSPC-specific error messages at non-verbose level
src/github.lib.mjs Pre-operation disk space check + ENOSPC detection in catch
src/claude.lib.mjs Detect ENOSPC in error_during_execution errors array (using shared isENOSPC())
src/solve.mjs Change log upload failure messages from verbose-only to always visible (3 locations)
docs/case-studies/issue-1212/ Full case study with timeline, root causes, and solutions
experiments/test-enospc-detection.mjs Test script for isENOSPC() utility

Upstream Issues Filed

Test plan

  • All 69/70 existing tests pass (1 pre-existing failure unrelated to changes)
  • ESLint passes
  • isENOSPC() utility tested with 11 test cases (experiments/test-enospc-detection.mjs)
  • claude.lib.mjs stays within 1500-line CI limit (exactly 1500 lines)
  • Case study documents timeline, root causes, and 6 proposed solutions
  • Upstream issues filed with reproducible examples

🤖 Generated with Claude Code

Fixes #1212

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #1212
@konard konard self-assigned this Feb 2, 2026
konard and others added 3 commits February 2, 2026 19:12
Document the timeline, root causes, and proposed solutions for the ENOSPC
error during log upload that resulted in a false positive SUCCESS message.
Includes full solve session log from the incident.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…#1212)

- Add isENOSPC() utility to lib.mjs for detecting disk space errors
- Fix solve.results.lib.mjs to show PARTIAL SUCCESS when errorDuringExecution
  is true instead of unconditional SUCCESS
- Add ENOSPC-specific error messages in token-sanitization.lib.mjs with
  actionable guidance (e.g., cleanup ~/.claude/debug)
- Add pre-operation disk space check in github.lib.mjs before log upload
- Detect ENOSPC in claude.lib.mjs error_during_execution errors array
- Change log upload failure messages from verbose-only to always visible
  across solve.mjs (3 locations)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… (Issue #1212)

Add changeset for version bump and update case study with links to
upstream issues filed at anthropics/claude-code#22584 and
link-foundation/gh-upload-log#23.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] If pull request already created we should catch ENOSPC errors and inform the user about it, and we also should upload log in case of such errors fix: catch ENOSPC errors and fix false positive SUCCESS message (Issue #1212) Feb 2, 2026
@konard konard marked this pull request as ready for review February 2, 2026 18:18
@konard
Copy link
Contributor Author

konard commented Feb 2, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.511124 USD
  • Calculated by Anthropic: $5.902989 USD
  • Difference: $-2.608135 (-30.64%)
    📎 Log file uploaded as Gist (1425KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard marked this pull request as draft February 2, 2026 19:57
@konard
Copy link
Contributor Author

konard commented Feb 2, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-02-02T19:57:26.005Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

…ssue #1212)

Condense ENOSPC detection in executeClaudeCommand to use the shared
isENOSPC() utility from lib.mjs instead of inline checks, bringing
claude.lib.mjs back within the 1500-line CI limit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review February 2, 2026 20:15
@konard
Copy link
Contributor Author

konard commented Feb 2, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.229841 USD
  • Calculated by Anthropic: $1.247363 USD
  • Difference: $-0.982478 (-44.06%)
    📎 Log file uploaded as Gist (361KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If pull request already created we should catch ENOSPC errors and inform the user about it, and we also should upload log in case of such errors

1 participant