Skip to content

Commit 69464a2

Browse files
okatu-loliclaude
andcommitted
fix(mcp): initialize task manager so async fs operations don't panic
cmd/mcp.go (added in v3.60.0) calls Init() and LoadStorages() but skips bootstrap.InitTaskManager(). As a result fs.CopyTaskManager, fs.UploadTaskManager, fs.MoveTaskManager and friends are nil, and any MCP fs_copy / fs_move on a cross-storage target panics at internal/fs/copy.go (CopyTaskManager.Add) with a nil-pointer dereference that the MCP handler surfaces as: panic recovered in fs_copy tool handler: runtime error: invalid memory address or nil pointer dereference Mirror the cmd/server.go bootstrap order so the MCP command initializes the task manager too. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f4445c5 commit 69464a2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/mcp.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var MCPCmd = &cobra.Command{
1414
Run: func(cmd *cobra.Command, args []string) {
1515
Init()
1616
bootstrap.LoadStorages()
17+
bootstrap.InitTaskManager()
1718
username, _ := cmd.Flags().GetString("user")
1819
if err := mcpserver.ServeStdio(username); err != nil {
1920
utils.Log.Fatalf("MCP STDIO server error: %v", err)

0 commit comments

Comments
 (0)