Claude Agent SDK v0.2.85 Adds reloadPlugins() for Dynamic MCP Server Updates

Claude Agent SDK v0.2.85 Adds reloadPlugins() for Dynamic MCP Server Updates

The latest Claude Agent SDK update introduces a reloadPlugins() method, letting developers refresh MCP servers and commands without restarting their agent.

GAla Smith & AI Research Desk·2d ago·2 min read·3 views·AI-Generated
Share:
Source: github.comvia gh_claude_sdkSingle Source

What Changed — SDK v0.2.85 Release

The Anthropic Claude Agent SDK for TypeScript/JavaScript has been updated to version 0.2.85. This release, which brings parity with Claude Code v2.1.85, includes one significant new feature and a critical fix for developers building custom agents.

The headline addition is the reloadPlugins() SDK method. This allows a running Claude Agent to dynamically reload its configured plugins, receiving refreshed commands, agent definitions, and MCP server statuses. Previously, updating plugin configurations or MCP servers often required restarting the agent process.

A notable fix addresses a bug where PreToolUse hooks with permissionDecision: "ask" were being ignored when the SDK was running in SDK mode. This restores expected permission-request behavior for custom tool integrations.

What It Means For You — Hot-Reload for Your Agent's Toolkit

If you're using the Claude Agent SDK to build custom coding assistants, automation workflows, or specialized agents, this update directly impacts your development loop. The reloadPlugins() method eliminates a major friction point: the need to stop and restart your agent every time you modify an MCP server configuration, add a new command, or update a plugin's capabilities.

This is particularly valuable when iterating on MCP servers. You can now adjust a server's configuration, prompts, or capabilities, call reloadPlugins(), and have your agent immediately recognize the changes. It enables a more interactive and efficient development workflow, mirroring the hot-reload experience familiar from modern web development.

The fix for PreToolUse hooks ensures that permission-gating logic works correctly, which is crucial for building secure, user-confirmed actions into your agent's toolset.

Try It Now — Updating and Implementing

First, update your SDK dependency:

npm install @anthropic-ai/claude-agent-sdk@0.2.85
# or use yarn, pnpm, or bun

After updating, you can integrate reloadPlugins() into your agent's control flow. The method is typically called on the agent instance. Here's a conceptual example of how you might trigger it, perhaps via a custom admin command or a file watcher:

// Assuming you have your agent instance
async function handleConfigUpdate() {
  console.log('Reloading plugins...');
  try {
    await agent.reloadPlugins();
    console.log('Plugins reloaded successfully. Commands and MCP servers refreshed.');
  } catch (error) {
    console.error('Failed to reload plugins:', error);
  }
}

Consider setting up a file watcher on your MCP configuration files or a lightweight HTTP endpoint to trigger a reload when you deploy new server definitions, making your agent's capability updates seamless.

AI Analysis

**For Claude Code Developers Building Custom Agents:** This update is a workflow accelerator. If you're extending Claude Code's capabilities via the SDK, start by updating immediately. Then, architect your development environment to leverage `reloadPlugins()`. Instead of a full restart, set up a trigger—like a specific CLI command or a watched config file—to call the method after you make changes to your `claude_code_config.json` or any local MCP server definitions. This can cut iteration time on tool integrations by 50% or more. **For MCP Server Developers:** Your development loop just got faster for SDK users. When testing a new MCP server with a custom agent, you can now modify the server's prompts, tools, or schema and have the agent pick up the changes without a restart. Ensure your server handles graceful re-initialization. This SDK update, following the recent trend of 174 Claude Code articles this week, signals Anthropic's continued investment in the programmability and extensibility of its agent ecosystem.
Enjoyed this article?
Share:

Related Articles

More in Products & Launches

View all