[BUG] Unnecessary wrapper functions created even when function is provided to achieve same functionality

Resolved 💬 5 comments Opened Sep 17, 2025 by avnishbm Closed Jan 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude code creates python wrapper functions even when a utility function is provided to achieve the same functionality! This despite the wrapper function having no additional functionality. This tendency creates unnecessary additional functions when not needed and increases file size, and many times more number of files when for the wrapper function claude even creates a class file!

What Should Happen?

When utility function is given to achieve a functionality and no additional functionality is needed over and above the utility function output, it should directly use the provided utility function.

Error Messages/Logs

Steps to Reproduce

Have seen this in varied scenarios e.g. when i give it a function to calculate_trade_charges() or to getData(), it writes a wrapper function or even wrapper class that in turn uses this utility function to achieve the purpose, where as it could have directly used those functions in the code.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

1.0.117 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗