Repository navigation
feat: add the Claude Agent SDK coding agent - #3
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds a Claude Agent SDK implementation of the coding agent in
claude-agent-sdk/, ported fromopenai-agents-sdk/with the Python Claude design from bolt-python-coding-agent#16.listeners/, the framework-freeagent/files, and the listener, approvals, and workspace tests are copied unchanged, so onlyagent/agent.js,agent/guardrails.js, andagent/tools/use the SDK.CLAUDE.mdfiles, and MCP servers.verbatimPromptskeeps an@pathinside a Slack message from reading a local file. Usesclaude-sonnet-5-5for coding andclaude-haiku-4-5for routing.PreToolUsehook'sdeferdecision. The run ends with the command waiting, and a click resumes the Claude Code session. The hook then allows or denies that same call.canUseTooldenies it withinterrupt, so closing it costs no model call.PostToolUsehook ends the run once a channel is created or archived. The stop button denies every tool call, a throwing tool reaches the model as an error result, and running out of turns ends with a message, keeping the session.--mcp-configas well as the SDK option. The TypeScript SDK registers it too late for the CLI to resume a deferred call, which then fails as "tool not available". The Python SDK already passes the flag itself.claude-agent-sdk/to the lint and tests matrices, dependabot, the root README, andAGENTS.md.tests/agent/runs.test.jsdrives the real SDK and bundled CLI againsttests/fake-model.js, a local server that answers the Messages API from a script. The CLI's config goes to a temp directory, and the suite takes about 30s.Testing
claude-agent-sdk/.env.sampleto.env, setANTHROPIC_API_KEY, and start the app withslack runfromclaude-agent-sdk/.🤖 Generated with Claude Code