What the agent does
This is for a SaaS company whose customer-success team runs a Slack Connect channel with each larger customer. Questions arrive all day from people at the customer's company, a teammate reacts with an emoji meaning "on it", and by Friday nobody remembers which threads still have no answer. The run names one connection, slack, signed in as the customer-success lead. Rush's Slack sign-in gives the agent the slack command-line tool, which calls Slack's Web API as that person (slack api <method> key=value), with read scopes for channels and their history, users:read, and chat:write.
The agent first calls auth.test to learn the lead's own workspace team_id. It lists conversations with conversations.list, types=public_channel,private_channel and exclude_archived=true, following next_cursor until the list ends, and keeps the channels marked is_ext_shared: those are the ones shared with another organization. It reads only the shared channels whose is_member is true, the ones the lead has joined, and lists the rest by name instead of guessing what is in them.
For each shared channel it reads the last two working days with conversations.history, passing oldest as a Unix timestamp, and opens every thread with conversations.replies. It calls users.info once per author and treats anyone whose team_id is not the lead's workspace as the customer. A message from the customer counts as a question when it asks something or reports a problem, and it is unanswered when no one from the company's own workspace has replied after it in the thread or in the channel. An emoji reaction is not a reply.
It writes unanswered.md, grouped by channel and oldest first: who asked, when, the question in one line with a quote of the key words, how long it has waited in working hours, and a link built from the channel id and the message ts. Last, it posts one message with chat.postMessage to the team's internal channel named in the input: the count per channel and the three oldest questions. It never posts in a shared channel.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Use the Slack connection. Call auth.test to get our team_id. List public and private channels with conversations.list (exclude archived, follow next_cursor) and keep those with is_ext_shared true. For each one with is_member true, read messages from the last 48 hours with conversations.history and every thread with conversations.replies. A message's author is a customer when users.info shows a team_id other than ours. List each customer question or problem report that has no later reply from someone on our team; reactions do not count as replies. Write unanswered.md grouped by channel, oldest first: author, time, the question in one line with a short quote, hours waiting, and a link. List shared channels you are not a member of separately. Then post one summary to #cs-internal: count per channel and the three oldest questions with links. Never post in a shared channel and never reply to a customer.",
"connections": [
"slack"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The session returns unanswered.md as an artifact and the same list in result, and the team sees the short summary in its internal channel when the day starts. Each line links to the message, so the person who owns that customer opens the thread and answers it themselves. The agent writes no reply to a customer.
What the lead checks: questions that were answered somewhere the agent could not see, such as a call or an email, which they mark done themselves; messages the agent read as questions that were really comments; and the list of shared channels the lead never joined, where nothing could be read at all. The transcript shows every Slack method the agent called and with which channel, so a missed thread can be traced.
Run it on every working morning
In the console, a Project automation with a schedule trigger, cron 0 8 * * 1-5 and the team's timezone, runs this prompt each working morning. The 48-hour window in the prompt covers a Monday morning, which reads back over the weekend.
Automations count against their own max_runs_per_hour, separate from any API key, and each run is its own session with its own record, so last Tuesday's list can be read next to today's to see which customers keep waiting.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
A Slack bot that does this needs an app installed in the workspace and added to every shared channel, and the customer's admins see it there. This run reads as the lead who is already a member, with the slack tool signed in from outside the agent's computer: the token is held by Rush and never sits in the prompt, a config file or a teammate's laptop.
Deciding whether a message is a question and whether a later message answers it is reading, which a keyword script gets wrong in both directions. Each run keeps a record of what it read and what it decided, and the session lists the cost of its model calls, so the team can see what the daily check costs before it adds more channels.
Frequently asked questions
Can the agent read channels the lead is not in?
It acts as the lead, so it can never reach more than the lead can, and the prompt keeps it to channels the lead has joined. Shared channels the lead has not joined are listed by name in the report, and the lead decides whether to join them.
Will it reply to customers?
Not with this prompt. The sign-in includes chat:write, so the prompt names the one internal channel it may post in and says never to post in a shared channel, and the transcript records every chat.postMessage it makes.
How does it tell a customer from a teammate?
By the author's team_id from users.info: anyone from another workspace is the customer. Guests from the customer who were invited straight into the company's own workspace would read as teammates, so list their user ids in the prompt if the team has any.
Does a thumbs-up count as an answer?
No. A reaction often means someone saw it, not that it was answered, so the prompt counts only a written reply. A team that uses a specific emoji to mean "resolved" can say so in the prompt.