Feature Request: HTTP API for Claude Code Agentic Workflows
Resolved 💬 1 comment Opened Apr 17, 2025 by firmai Closed Apr 17, 2025
Problem:
Currently, Claude Code's powerful agentic capabilities are primarily accessible via the CLI. This limits integration possibilities. Developers need a programmatic way (HTTP API) to leverage Claude Code within custom tools, IDE extensions, web frontends, and automated CI/CD workflows.
Proposed Solution:
Develop a stable HTTP API exposing Claude Code's core functionalities. This API should enable external clients to initiate, manage, and interact with agentic coding sessions programmatically.
Key API Capabilities:
- Session Management: Endpoints to start/stop coding sessions tied to specific project directories (preserving context).
- Task Execution: An endpoint to submit complex, multi-step tasks via natural language prompts (e.g., POST /sessions/{id}/tasks).
- Agentic Tool Access: Expose underlying capabilities used by the agent, including secure file system operations (read, write, search), code generation/modification, and sandboxed shell command execution.
- Asynchronous Handling: Support for long-running tasks via webhooks or polling mechanisms, with streaming responses for real-time feedback during execution.
- Execution Control: Allow clients to specify execution constraints for tasks, such as maximum token limits, time limits, or defining specific success criteria/goals to terminate execution automatically. This enables controlled, exploratory "vibe coding" style interactions within defined resource boundaries.
- Authentication & Permissions: Robust authentication (e.g., API keys) and fine-grained permission handling aligned with existing CLI security principles.
Benefits:
- Unlocks integration into a wider range of developer tools and platforms.
- Enables automation of complex coding/maintenance tasks.
- Allows developers to build highly customized experiences powered by Claude Code's agentic reasoning.
- Facilitates controlled, resource-aware execution for potentially open-ended tasks.
This enhancement would significantly broaden Claude Code's applicability and make its advanced capabilities accessible to a larger ecosystem.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗