← Reddit

i built a terminal coding agent with claude (gpulse)

Reddit · Even_Ganache6148 · June 19, 2026
A developer created gpulse, a CLI coding agent that uses Claude to help code the main loop and Gemini API as its brain to execute commands, edit files, and connect to terminal tools. After a week of refinement and testing, the agent successfully completed a complex task: creating a React app, pushing it to GitHub, deploying to Vercel, and sharing the public URL. The developer also built a custom MCP client from scratch using TypeScript and Node.js for stdio and SSE transport, with Claude's assistance in structuring the transport streams and handling JSON-RPC message parsing.

Detailed Analysis

A developer known as gpulse on Reddit has constructed a terminal-based coding agent, also named "gpulse," using a hybrid AI architecture in which Anthropic's Claude served as a coding collaborator during development while Google's Gemini API functions as the operational intelligence powering the agent's runtime behavior. The project, built over approximately one week of iterative debugging and refinement, enables the agent to execute terminal commands, edit files, and interface with external tools directly from the command line. The developer demonstrated the system's end-to-end capability by tasking it with creating a React application, pushing the project to GitHub, deploying it to Vercel, and returning the live public URL — a multi-step workflow that crosses several distinct developer toolchains without manual intervention.

One of the more technically notable design decisions involves the agent's handling of runaway tool loops. The developer introduced a maximum iteration cap on tool execution cycles, and when the agent reaches that ceiling, it pauses and waits for a user "continue" prompt rather than automatically retrying. This reflects a deliberate tradeoff between autonomy and cost control: unchecked agentic loops can rapidly exhaust API credits and generate unpredictable behavior, so the pause mechanism functions as a lightweight safety valve. The approach is emblematic of a broader challenge in agentic AI systems — balancing sufficient autonomy to be useful against the risk of uncontrolled, compounding tool calls.

Perhaps the most technically ambitious component of the project is the developer's decision to implement the Model Context Protocol (MCP) client from scratch in pure TypeScript using Node.js built-ins, deliberately bypassing the official Anthropic SDK. MCP, introduced by Anthropic in late 2024, is a standardized protocol for connecting AI models to external tools, data sources, and services. Writing the transport layer manually — including both stdio and Server-Sent Events (SSE) mechanisms — and handling raw JSON-RPC message parsing requires a detailed understanding of the protocol's internals. The developer credits Claude with providing meaningful assistance in structuring these transport streams, illustrating a recursive dynamic in which Claude's capabilities are used to build infrastructure that could ultimately run other AI models.

The project sits at the intersection of several accelerating trends in developer tooling and AI infrastructure. The proliferation of CLI-based AI agents reflects a growing preference among developers for lightweight, composable tools that integrate with existing terminal workflows rather than requiring dedicated GUIs or web interfaces. The choice to use Gemini as the runtime brain while leaning on Claude for code generation during development also highlights how developers are increasingly mixing models for different tasks within a single project — selecting each model based on cost, capability, or API accessibility for a specific function. This kind of model-agnostic architecture is becoming more common as the ecosystem matures and developers prioritize flexibility over vendor loyalty.

Gpulse's project also underscores the expanding role of MCP as a practical integration layer for agentic systems. By building the client manually rather than using the SDK, the developer gained low-level control over transport and message handling, which is particularly valuable when building agents that need to operate reliably in constrained or custom environments. As agentic coding assistants become more capable of completing multi-step, cross-platform workflows autonomously, the engineering patterns being explored in projects like gpulse — iteration caps, manual MCP implementations, hybrid model architectures — are likely to influence how more mature and production-ready tools are eventually designed.

Read original article →