Using an AI-friendly CLI inside a web app backend is risky

A team built its own CLI because many internal apps did not provide an official one. That CLI has worked well for s, almost like a local MCP. The new concern is a plan to use the same CLI inside the main backend logic of web apps.

The proposed setup would have a Python backend start a , run , and let those commands make the API calls. The existing approach has been to call the API directly through an SDK or Python request library. The concern is that the CLI route adds harder , retries, extra memory use, and more moving parts.

Codex and Claude Code may make code easier to write, but that does not make an agent-friendly tool a good production backend design. The argument in favor is that the commands already work with , so reusing them may feel easier and simpler to debug.

Key points

  • The custom CLI works well for s as a local MCP-like tool.
  • The proposed backend design runs from Python through a .
  • Those would make API calls instead of using an SDK or Python request library directly.
  • The main risks are , retries, memory use, and added complexity.
  • Codex and Claude Code can speed up coding, but they do not remove the need for sound design.
Read original