Claude (SDK) chat + tool-calling, budgeting, and docs/test updates#1
Merged
Conversation
added 7 commits
June 1, 2026 02:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 PR significantly expands Agents Fleet beyond PTY/CLI session monitoring by adding a full Claude (SDK) chat experience powered by the Anthropic SDK, including agentic tool-calling to run repo commands with Approve/Reject gating, improved budgeting (including tool-loop enforcement), and documentation + tests to reflect the new capabilities.
Key Features Added
Claude (SDK) Chat Sessions
claude_sdk_config_v1)claude_sdk_user_message_v1)claude_sdk_assistant_message_v1)claude_sdk_usage_v1)claude_sdk_tool_approval_v1)claude_sdk_tool_result_v1)WebSocket Streaming (Chat + Tools)
/wsbeyond PTY streaming to support Claude SDK:claude_sdk_chunk,claude_sdk_done)claude_sdk_tool_request,claude_sdk_tool_output)claude_sdk_tool_decision) to approve/reject commandsTool-Calling:
run_command(Any Shell Command)run_command({ command })Budgeting Improvements
computeModelCostUsdwith a best-effort model pricing tableprocessManager.stopSession(...)for Claude SDK sessions (no-op)sessionsrow withstop_reason='budget_exceeded', timestamps, and statusUsage Visibility
claude_sdk_usage_v1artifact after a turn and displays:Tests Added
apps/server/test/claude_sdk_budget.test.tsDocs Updated
ROADMAP.mdREADME.mdARCHITECTURE.mdNotes / Follow-ups
Validation
pnpm -r typecheckpnpm -r buildpnpm -r -F @agents_fleet/server test