# Live events

## 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](https://sprintree.com/docs/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

1. Update the plugin so it includes the event monitor:

   ```bash
   claude plugin marketplace update sprintree && claude plugin update sprintree@sprintree
   ```

2. In Claude Code, run `/sprintree:connect`. It shows a link and a code, and opens your browser.
3. On the page that opens, check that the code matches the one in your terminal. Press **Approve**.

![The live events approval page with the code and Approve highlighted](https://sprintree.com/docs-media/ai-live-approve-light-99d1014b.webp)

4. When you sign the plugin in to Sprintree with `/mcp`, tick **Account settings** on the approval page. Without it, the session cannot act on `/claude` comments.
5. Tell the session which project to follow. Put `{"project": "WEB"}` in a file named `.sprintree.json` in your repository, replacing WEB with your project key.
6. 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 on` turns commands on for this session, with no restart. Use `off` to turn them off again.
- `/sprintree:commands default on` sets the choice for every session that has none of its own.
- `/sprintree:commands status` shows 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.

![Live connections list with the /claude on badge and the Detach button highlighted](https://sprintree.com/docs-media/ai-live-connections-light-f174bd08.webp)

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

> [!WARNING]
> Only approve a code you started yourself, in your own terminal. If someone sends you a connect link, press **Deny**.

- 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](https://sprintree.com/docs/agent-triggers) to turn a status or label change into a job.
- [Connect an AI agent](https://sprintree.com/docs/connect-an-ai-agent) for the plugin and sign-in.
- [Access tokens](https://sprintree.com/docs/access-tokens) to revoke tokens.
- [Technical MCP reference](https://sprintree.com/docs/mcp#live-events) for session routing details.
