Skip to content

feat: add the team agent to the Claude Agent SDK app - #6

Merged
zimeg merged 7 commits into
mainfrom
clack/team-agent-claude
Oct 29, 2026
Merged

zimeg merged 7 commits into
mainfrom
clack/team-agent-claude

Conversation

@zimeg

@zimeg zimeg commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request brings the claude-agent-sdk app to parity with the OpenAI Agents SDK team agent from #5: the agent writes what channel messages settle into runbooks, then answers from those runbooks next time.

  • Runbooks are canvases titled Runbook: <topic>.
  • Bot-token runbook tools list_runbooks (files.list), read_runbook (canvases.getContent), and create_runbook (canvases.create with channel_id) are served in-process with create_sdk_mcp_server(), next to the emoji reaction tool.
  • The Slack MCP Server is optional. When a person has connected it, the agent uses the Slack MCP Server's search and canvas tools in place of the bot-token runbook tools, so it works as them and can edit existing runbooks.
  • Tools are limited with permission_mode="dontAsk" and an allowed_tools list for each path, replacing bypassPermissions. The Claude Agent SDK has no tool filter, so the model still sees the other Slack MCP tools, but calls to them are denied.
  • The in-process tool server is built for each run with only that path's tools, so the bot-token runbook tools aren't offered next to the Slack MCP Server. disallowed_tools would deny them but leave them visible, and the model kept calling them.
  • slack_search_public is allowed next to slack_search_public_and_private. The model picks public search to find runbooks, and it reaches no further than the private search already allowed.
  • One agent learns as it answers. The message listener runs it on each channel message. When a run calls a runbook write tool, the message's author gets an ephemeral note with the link. Nothing is posted to the channel.
  • run_agent() also returns the names of the tools it called, which is how the learn pass knows a runbook was written. The reply is the result message's final text.
  • Runs are capped at 50 turns, and a run that hits the cap ends with a message.
  • Matching bolt-python-coding-agent, the model is pinned to claude-sonnet-5-5, and the agent gets none of Claude Code's built-in tools, settings, or local MCP servers (tools=[], setting_sources=[], strict_mcp_config=True, verbatim_prompts=True).
  • New bot scopes: canvases:read, canvases:write, files:read. Both scope lists are sorted.

Known risks (same as #5):

  • With the Slack MCP Server connected, a crafted message could steer the agent into searching the author's DMs and private channels, or into editing any canvas they can open.
  • Two messages close together are learned from at the same time, which can create two copies of a new runbook.
  • Learning sees only the message itself, not its thread.

Testing

  • Run slack run and invite the agent to a channel. Post "Fixed it: rotate the signing secret, then redeploy." Confirm a Runbook: <topic> tab appears in the channel and only you see an ephemeral note with the link.
  • Post small talk and confirm nothing changes and no note appears.
  • @mention the agent with the same problem and confirm it answers from the runbook and links it.
  • With OAuth (app_oauth.py), connect the Slack MCP Server from the Home tab. Post a correction ("Actually, redeploy before rotating") and confirm the existing runbook is updated.
  • With the Slack MCP Server connected, @mention the agent asking it to post a message in another channel, and confirm it doesn't.

🤖 Generated with Claude Code

zimeg and others added 4 commits October 28, 2026 10:40
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…ssages

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…s and prompts

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…TS.md

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added enhancement M-T: A feature request for new functionality new PR only - a new app is being introduced semver:minor Use on pull requests to describe the release version increment labels Oct 28, 2026
@zimeg zimeg self-assigned this Oct 28, 2026
zimeg and others added 3 commits October 28, 2026 22:03
…s with the Slack MCP Server

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…rch with the Slack MCP Server

Disallowed tools stay visible to the model, so the bot-token runbook tools were offered and denied on the Slack MCP Server path. The model also picks slack_search_public, which was denied.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg marked this pull request as ready for review October 29, 2026 05:53
@zimeg
zimeg enabled auto-merge (squash) October 29, 2026 05:54
@zimeg
zimeg disabled auto-merge October 29, 2026 05:56
@zimeg
zimeg merged commit eda828a into main Oct 29, 2026
7 checks passed
@zimeg
zimeg deleted the clack/team-agent-claude branch October 29, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality new PR only - a new app is being introduced semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant