Skip to content

fix: remove deprecated generateTaskFiles calls from MCP tools#1277

Merged
Crunchyman-ralph merged 3 commits intonextfrom
claude/issue-1271-20251005-1915
Oct 6, 2025
Merged

fix: remove deprecated generateTaskFiles calls from MCP tools#1277
Crunchyman-ralph merged 3 commits intonextfrom
claude/issue-1271-20251005-1915

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Oct 6, 2025

Removed generateTaskFiles() calls from add_subtask, remove_subtask, and move_task functions to fix MCP connection errors. The generateTaskFiles functionality is no longer supported and was causing "Cannot read properties of null (reading 'toString')" errors.

Fixes issue #1271 - MCP Connection Closed Error After Upgrading to v0.27.3

Generated with Claude Code

Summary by CodeRabbit

  • New Behavior
    • Task updates (add/remove subtasks, move tasks) no longer trigger automatic task-file generation; operations now complete without that side effect.
  • Refactor
    • Legacy file-generation logic removed while preserving public APIs and task update flows.
  • Chores
    • Removed unused references related to file generation.
  • Documentation
    • Added a changeset documenting a fix for MCP connection errors caused by deprecated generation calls.
  • Tests
    • Adjusted/removed tests that asserted file-generation side effects.

Removed generateTaskFiles() calls from add_subtask, remove_subtask, and move_task functions to fix MCP connection errors. The generateTaskFiles functionality is no longer supported and was causing "Cannot read properties of null (reading 'toString')" errors when the tag parameter was null/undefined.

Fixes:
- scripts/modules/task-manager/add-subtask.js: removed generateTaskFiles call and import
- scripts/modules/task-manager/remove-subtask.js: removed generateTaskFiles call and import
- scripts/modules/task-manager/move-task.js: removed generateTaskFiles calls and import

Resolves issue #1271 - MCP Connection Closed Error After Upgrading to v0.27.3

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: 8dde2aa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 6, 2025

Walkthrough

Removed calls and imports for generateTaskFiles (and unused path) from add-subtask, move-task, and remove-subtask; tests updated to remove expectations for generation. Added a changeset documenting MCP connection errors caused by deprecated generation calls. Core task read/write and public APIs unchanged.

Changes

Cohort / File(s) Summary
Task-manager modules (generation removed)
scripts/modules/task-manager/add-subtask.js, scripts/modules/task-manager/move-task.js, scripts/modules/task-manager/remove-subtask.js
Deleted imports of generateTaskFiles (and path where present). Removed post-operation calls that invoked task-file generation in add, move (batch & single) and remove flows; replaced with comment notes. Core logic, data read/write, and public APIs unchanged.
Unit tests (generation expectations removed)
tests/unit/scripts/modules/task-manager/add-subtask.test.js, tests/unit/scripts/modules/task-manager/move-task.test.js
Removed assertions/tests that expected generateTaskFiles to be invoked. Other test logic unchanged.
Changeset metadata
.changeset/fix-mcp-connection-errors.md
Added changeset documenting fix for MCP connection errors caused by deprecated generateTaskFiles calls; descriptive metadata only.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Caller
  participant TM as TaskManager (Before)
  participant FS as FileStore
  participant FG as FileGen

  Note over TM,FG: Previous flow (with generation)
  C->>TM: add/move/remove
  TM->>FS: read/update/write JSON
  TM->>FG: generateTaskFiles()
  FG-->>TM: done
  TM-->>C: result
Loading
sequenceDiagram
  autonumber
  participant C as Caller
  participant TM as TaskManager (Now)
  participant FS as FileStore

  Note over TM: Current flow (no generation)
  C->>TM: add/move/remove
  TM->>FS: read/update/write JSON
  TM-->>C: result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly summarizes the main change by indicating removal of deprecated generateTaskFiles calls from the MCP tools. It directly reflects the modifications in the add_subtask, remove_subtask, and move_task scripts without extraneous details. This concise phrasing ensures reviewers understand the primary goal at a glance.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-1271-20251005-1915

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04371a8 and 8dde2aa.

📒 Files selected for processing (2)
  • tests/unit/scripts/modules/task-manager/add-subtask.test.js (0 hunks)
  • tests/unit/scripts/modules/task-manager/move-task.test.js (0 hunks)
💤 Files with no reviewable changes (2)
  • tests/unit/scripts/modules/task-manager/add-subtask.test.js
  • tests/unit/scripts/modules/task-manager/move-task.test.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crunchyman-ralph
Copy link
Collaborator Author

@claude please add a changeset in .changeset

@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next October 6, 2025 09:38
@claude
Copy link
Contributor

claude bot commented Oct 6, 2025

Claude finished @Crunchyman-ralph's task —— View job


Tasks

  • Analyze the changeset format used in this repository
  • Create appropriate changeset file for the MCP connection fix
  • Commit and push the changeset

Changeset Added

I've created and committed a changeset file (.changeset/fix-mcp-connection-errors.md) that describes this bug fix. The changeset:

  • Marks this as a patch version bump (appropriate for bug fixes)
  • Describes the fix in user-facing terms: resolving MCP connection errors
  • References the specific error message that users were experiencing

The changeset will be processed during the next release to automatically update the version and generate release notes.

--- | Branch: claude/issue-1271-20251005-1915

Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f37320 and 04371a8.

📒 Files selected for processing (1)
  • .changeset/fix-mcp-connection-errors.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
.changeset/*.md

📄 CodeRabbit inference engine (.cursor/rules/changeset.mdc)

.changeset/*.md: When running npm run changeset or npx changeset add, provide a concise summary of the changes for the CHANGELOG.md in imperative mood, typically a single line, and not a detailed Git commit message.
The changeset summary should be user-facing, describing what changed in the released version that is relevant to users or consumers of the package.
Do not use your detailed Git commit message body as the changeset summary.

Files:

  • .changeset/fix-mcp-connection-errors.md
.changeset/*

📄 CodeRabbit inference engine (.cursor/rules/new_features.mdc)

Create appropriate changesets for new features, use semantic versioning, include tagged system information in release notes, and document breaking changes if any.

Files:

  • .changeset/fix-mcp-connection-errors.md
🧠 Learnings (2)
📚 Learning: 2025-09-24T15:12:58.855Z
Learnt from: CR
PR: eyaltoledano/claude-task-master#0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/**/.mcp.json : Configure the Task Master MCP server in .mcp.json under mcpServers.task-master-ai using npx task-master-ai and provide required API key env vars

Applied to files:

  • .changeset/fix-mcp-connection-errors.md
📚 Learning: 2025-07-17T21:33:57.585Z
Learnt from: Crunchyman-ralph
PR: eyaltoledano/claude-task-master#1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.

Applied to files:

  • .changeset/fix-mcp-connection-errors.md
🪛 markdownlint-cli2 (0.18.1)
.changeset/fix-mcp-connection-errors.md

5-5: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


5-5: Files should end with a single newline character

(MD047, single-trailing-newline)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

"task-master-ai": patch
---

Fix MCP connection errors caused by deprecated generateTaskFiles calls. Resolves "Cannot read properties of null (reading 'toString')" errors when using MCP tools for task management operations. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Make the changeset summary single-sentence imperative and add trailing newline.

Per the repo’s changeset guidelines, keep the entry to a concise, imperative single line. Also ensure the file ends with a newline to clear MD047. Suggested rewrite: “Fix MCP connection errors when MCP task tools called deprecated generateTaskFiles.”

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

5-5: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)


5-5: Files should end with a single newline character

(MD047, single-trailing-newline)

🤖 Prompt for AI Agents
.changeset/fix-mcp-connection-errors.md around line 5: the changeset summary
must be a single, imperative sentence and the file must end with a newline;
replace the current line with the concise imperative sentence "Fix MCP
connection errors when MCP task tools call deprecated generateTaskFiles." and
ensure the file ends with a trailing newline character.

@Crunchyman-ralph Crunchyman-ralph merged commit 7b5a7c4 into next Oct 6, 2025
6 checks passed
@Crunchyman-ralph Crunchyman-ralph deleted the claude/issue-1271-20251005-1915 branch October 6, 2025 09:55
github-actions bot added a commit that referenced this pull request Oct 6, 2025
  This PR was automatically generated to update documentation based on recent changes.

  Original commit: fix: remove deprecated generateTaskFiles calls from MCP tools (#1277)\n\nCo-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>\nCo-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>\nResolves issue #1271 - MCP Connection Closed Error After Upgrading to v0.27.3\n\n

  Co-authored-by: Claude <claude-assistant@anthropic.com>
@github-actions github-actions bot mentioned this pull request Oct 7, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 17, 2025
16 tasks
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
…ledano#1277)

Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Resolves issue eyaltoledano#1271 - MCP Connection Closed Error After Upgrading to v0.27.3
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.

1 participant