Anthropic has introduced mods for Claude Code, a feature built from small TypeScript functions that connect to the coding agent's internal events. The company introduced the capability on October 1, describing it as a way to change what the agent does across its operating loop.

A mod can act before a prompt reaches the model or intervene as the agent handles tools and permissions. This gives the functions access to several points in the agent's process, including decisions about whether a tool call should proceed and what information should be returned.

What Claude Code mods can do

The available actions described by Anthropic include:

  • Rewrite a prompt before it reaches the model.
  • Block or retry a tool call.
  • Approve or deny a permission request.
  • Redact secrets from tool output.
  • Add new UI.
  • Replace a built-in feature.
  • Add entirely new functionality.

The hook surface runs across the agent loop, meaning mods are not limited to a single prompt or interface element. They can affect how Claude Code handles prompts, tool activity, permissions and tool results.

Why TypeScript functions matter

Mods are written as TypeScript functions. Their role is to connect custom code with Claude Code's internal events, allowing changes to be made at specific points in the agent's operation.

Anthropic's description presents the feature as broader than a simple interface extension. Alongside changing prompts and controlling tool calls, a mod can replace an existing built-in feature or add functionality that was not part of the original setup.

What the launch establishes

The launch establishes mods as a mechanism for changing Claude Code's behavior at multiple stages of the agent loop. The documented capabilities cover prompt handling, tool-call decisions, permission requests, tool-output handling and the user interface.

Anthropic's launch a mod can rewrite a prompt, add new UI, replace a built-in feature or add entirely new functionality. The company also identifies TypeScript functions and internal event hooks as the basis for the system.

Conclusion

Anthropic's Claude Code mods use TypeScript functions and internal event hooks to alter prompts, tool calls, permissions, tool output and built-in features across the agent loop.

Frequently Asked Questions

Q. What are Claude Code mods?

Claude Code mods are small TypeScript functions that hook into the agent's internal events and change what it does.

Q. When did Anthropic introduce Claude Code mods?

Anthropic introduced the feature on October 1.

Q. Can a mod change a Claude Code prompt?

Yes. A mod can rewrite a prompt before it reaches the model.

Q. Can mods control tool calls?

Yes. They can block or retry a tool call.

Q. Can mods change permission decisions?

Yes. A mod can approve or deny a permission request.

Q. Can mods protect secrets in tool output?

Yes. They can redact secrets from tool output.

Q. Can a mod replace a built-in feature?

Yes. Anthropic says a mod can replace a built-in feature or add entirely new functionality.