AI agents
Live events
Let a running Claude Code session hear about mentions, assignments and status changes, and send it commands from a card comment.
Last updated
Tell your agent when something happens#
Live events send a short message to your open Claude Code session whenever something happens in Sprintree. An event is a one-line notice, such as "you were mentioned on WEB-12" or "WEB-7 moved to In review". Nothing polls in the background. The Sprintree plugin keeps one connection open and the message arrives at once.
You can also write a command for your agent in a card comment. Start the comment with /claude, for example /claude run the tests and tell me what fails. The session that is working on that card picks it up.
Live events need Claude Code with the Sprintree plugin. See Connect an AI agent to install it.
When you need it#
You leave an agent working on a card and review in the browser. You spot a missing case, so you comment /claude add a test for the empty cart on the card. The agent sees it within seconds, does it and replies. You never switch to the terminal.
Set it up#
Update the plugin so it includes the event monitor:
claude plugin marketplace update sprintree && claude plugin update sprintree@sprintreeIn Claude Code, run
/sprintree:connect. It shows a link and a code, and opens your browser.On the page that opens, check that the code matches the one in your terminal. Press Approve.
- When you sign the plugin in to Sprintree with
/mcp, tick Account settings on the approval page. Without it, the session cannot act on/claudecomments. - Tell the session which project to follow. Put
{"project": "WEB"}in a file named.sprintree.jsonin your repository, replacing WEB with your project key. - Restart the Claude Code session. Monitors start with the session.
Approving gives the terminal read-only live events for the projects you can read. It cannot change anything. Approve only a code you just started yourself.
Turn on /claude commands#
Commands are off by default. Anyone who got into your Sprintree account could otherwise give work to your agent. You turn them on in the terminal, never in the browser.
/sprintree:commands onturns commands on for this session, with no restart. Useoffto turn them off again./sprintree:commands default onsets the choice for every session that has none of its own./sprintree:commands statusshows what applies now.
Other events, such as mentions, assignments, replies, review requests and status changes, arrive whether commands are on or off.
See and manage your connections#
Open Settings, then API & MCP, and find Live connections. Each row is one terminal session.
A row shows:
- The session address, such as
main·7f5c, made of the git branch name and four characters of the session id. - Which project it follows.
- Live or Idle, and when it was last seen.
- A /claude on or /claude off badge.
Press Detach to end a session's stream. A session that disappears, such as a sleeping laptop, leaves the list within about three minutes.
Send a command to one session#
If you run two sessions on one project, address one of them. Type /claude @ in a comment and pick a session from the list, for example /claude @main·7f5c fix the typo. Without an address, the command goes to the session that has that card in focus. If none has, the first session with commands on takes it.
If no live session matches the address, nobody gets the command. Sprintree still saves your comment and warns you.
Tips and common mistakes#
- The event line carries keys, usernames and counts only. It never carries card titles, descriptions or comment text. The agent reads the content over MCP, with your rights.
- The live-events token opens the event stream and nothing else. To cut it off for good, revoke it under Personal access tokens in Settings, API & MCP.
- An account can have up to 10 live connections. Detach old ones to make room.
- Changes your agent makes through MCP never wake a session, so an agent cannot trigger itself.
- Nothing arrives if the project is not set in
.sprintree.json. - Live events do not work with Bedrock, Vertex or Foundry, and need an interactive Claude Code session.
Related pages#
- Agent triggers to turn a status or label change into a job.
- Connect an AI agent for the plugin and sign-in.
- Access tokens to revoke tokens.
- Technical MCP reference for session routing details.