# Which Railway Projects Are Still Running for Clients We No Longer Serve? A Web Agency's Monthly Hosting Check

A web agency's agent lists every Railway project and service on the first of each month and flags the ones no active client account explains.

[Run this on Rush](https://cloud.getrush.ai/run/find-hosting-left-running-for-past-clients/railway/). Opens the console with this prompt ready to send. Connect Railway there first.

## What the agent does

This is for a web development agency that builds apps for clients and hosts many of them in its own Railway workspace: a booking site for a physiotherapy chain, an internal dashboard for a builder's merchant, a staging copy of a store that launched last spring. Projects pile up. A client moves to their own hosting, a prototype never goes live, a contractor spins up a test service and leaves, and the services keep running on the agency's bill because nobody owns the question of what should still be there. Once a month the agent answers it for the operations lead, against the list of client accounts the agency is still paid for.

Someone at the agency connects Railway once with `POST /me/connections {"type": "mcp", "name": "railway", "url": "https://mcp.railway.com", "auth": {"mode": "oauth"}}` and opens the `authorize_url`. Railway's docs say the OAuth sign-in lets the person choose which workspaces and projects the client can reach, so the operations lead grants the whole agency workspace: a project left out at consent is a project the check can never flag. Railway does not accept project tokens on this server; it needs a person's identity, which is why the sign-in belongs to someone who sees every project.

On a run the agent calls `whoami` to record which Railway account it is reading as, then `list-projects` for every project the grant covers, and `list-services` for each project. It matches each project to a client on the active list the prompt carries, by the project name and by the service names the agency's convention puts the client's short code in (`acme-web`, `acme-worker`). A project that matches no active client goes in a section called No active client. A project that matches a client but holds a service the client's line does not name, such as a second database or a service called `test` or `old`, goes in a section called Unexpected services. Every project the agent cannot place either way goes in Needs a person, with the reason.

Railway's remote server has no usage or billing tools, and the agent does not guess a cost: the report names projects and services, and the operations lead reads the spend for any flagged project on Railway's own usage page. The agent removes nothing, redeploys nothing and changes no feature flag. Railway marks `redeploy`, `accept-deploy` and `railway-agent` as destructive, and the prompt forbids them along with every create, set and delete tool and the cloud-agent tools, which Railway bills when started.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Check our Railway workspace against our active clients for November 2026. Use the railway connection. Call whoami and record the account. Call list-projects, then list-services for every project. Active clients (code: name, expected services): ACME: Acme Physio, acme-web, acme-worker, acme-db; BMX: Bramley Merchants, bmx-dashboard, bmx-db; OLV: Olive & Co, olv-store, olv-store-staging. Match each project to a client by its name or by a service name that starts with the client code. Write hosting-check.md with three sections: No active client (each project with its services), Unexpected services (project, client, the services not in that client's expected list), and Needs a person (anything you could not place, with why). Then a table of every project, its client or none, and its service count. Do not estimate costs. Never call redeploy, accept-deploy, railway-agent, run-cloud-agent-task, or any create, set, update or delete tool.",
  "connections": [
    "railway"
  ]
}
```

1. **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.
2. **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.
3. **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 `hosting-check.md` as an artifact, and the answer names how many projects have no active client. The operations lead reads the No active client section first: each line there is either a project to archive, a project someone forgot to tell them about, or a client the account list is missing. The transcript shows every list call and what it returned, so a project the report calls orphaned can be checked against Railway's own dashboard.

What the operations lead checks before acting: that the active list in the prompt was this month's, that a project marked No active client is not a pitch prototype a salesperson still needs, and the spend of each flagged project on Railway's usage page before deciding whether to archive it. Removing a service stays a person's job, in Railway, after the client's account manager agrees.

## Run it on every first working day of the month

The operations lead saves the agent once with `POST /o/{org}/agents`, naming the `railway` connection and the instructions above, and adds a console automation with a `schedule` trigger (`0 9 1 * *` with the agency's `timezone`) that runs it. A schedule fills nothing into the prompt, so the agency keeps the active client list in the saved prompt and edits it when a client joins or leaves, which is also the moment the list is most likely to be wrong.

Each month's run is its own session, so the agency keeps a dated record of what was running and what was flagged. When a client asks in March whether their old staging site was shut down, the January and February reports answer it.

## Why run it on Rush?

The check needs a Railway sign-in that sees every client's project, and that sign-in should not live in a script on one developer's laptop. On Rush it stays in the agency's connection, limited to the workspace the operations lead granted, and each run reads Railway as that account and nothing more.

Each run has its own computer and a record of every call it made and what its model calls cost, so the monthly check has a cost the agency can see beside the hosting it is trying to trim. Because the prompt lists the destructive tools by name and the transcript records every call, the operations lead can show a client that the check only read.

## Frequently asked questions

### Can the agent tell me what each forgotten project costs?

Not through Railway's remote MCP server: its docs list no usage, billing or metrics tools there. The report names the projects and services, and the spend comes from Railway's usage page, which is where the archive decision should be made anyway.

### What if the sign-in only covers some projects?

Railway's OAuth sign-in lets the person pick workspaces and projects, and the agent sees only those. A project outside the grant is invisible to the check, so the person who connects Railway grants the whole agency workspace. The report records the account from `whoami`, so the reader knows whose view it was.

### Will it delete or pause anything?

No. The prompt forbids every create, set, update, delete and redeploy tool and Railway's own agent tools, and Railway marks its destructive tools so they can be spotted in the transcript. Archiving a project is a decision for the agency and the client, made in Railway.

### Our project names do not follow the client code. Does this still work?

Partly. The agent matches on what the names give it and puts every project it cannot place in Needs a person, with its services listed. Agreeing on a naming convention for new projects, and noting the old exceptions in the saved prompt, is what makes the next month's check sharper.

## More Railway jobs

- [Which Feature Flags Changed or Were Left On This Week? A Restaurant-Ordering Software Company's Monday Flag Review on Railway](https://getrush.ai/run/review-feature-flags-each-week/railway/)

## More jobs like this: Produce a report or file, no repo

- [Which Loads Have Gone Quiet? A Freight Broker's Hourly Tracking Check in Axiom](https://getrush.ai/run/find-loads-with-stale-tracking/axiom/)
- [Which of Our Target Companies Posted New Roles This Week? A Recruiting Agency's Careers-Page Check](https://getrush.ai/run/find-new-openings-at-target-companies/web/)
- [Find New Public Bid Opportunities for a Construction Contractor Every Week](https://getrush.ai/run/find-new-public-bid-opportunities/web/)
- [Which Customer Quote Requests Have We Not Answered? A Wholesale Distributor's Morning Check of Each Sales Rep's Outlook](https://getrush.ai/run/find-quote-requests-with-no-reply/outlook/)
- [Find Customer Questions Nobody Answered in Your Shared Slack Channels](https://getrush.ai/run/find-unanswered-customer-questions/slack/)

## Keep reading

- [Connect Railway to Rush once, then name it on any run](https://getrush.ai/integrations/railway/)
- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
