Cloud Agents for Normies: Claude Code in the Cloud

The same hourly website check, but as a script in a GitHub repo that a cloud agent runs on a schedule

Part of Cloud Agents for Normies, where I try to run simple agents in the cloud so I can keep my laptop shut.

To recap: I’d like to know when OpenAI makes an announcement on their Product releases page without ever loading it up in the browser myself. Let’s have an agent check every hour.

The scheduled task version got a B. It ran in the cloud and it ran on time, and the whole thing lived inside one chat.

This one already looks like it’s going to fail the normie portion of the test pretty hard, since you have to know about programming things like a code repository and what GitHub is, not to mention have a GitHub account.

Oh well, here we go.

1. Connect GitHub

Go to claude.ai/code after signing in. It’ll prompt you to connect GitHub, and if not, then go to Settings → Connectors. Find GitHub Integration in the list and click Connect.

The Connectors settings panel listing Clay, GitHub Integration, Gmail, Google Calendar, Google Drive, and Slack, each with a Connect button and no authorization yet.
We’re through the looking glass now here, people.

That hands off to GitHub, which then asks what you’re installing and where:

The GitHub Install and Authorize Claude screen, with All repositories selected and an Only select repositories option beneath it, and the requested permissions listed: read access to commit statuses and metadata, and read and write access to actions, checks, code, discussions, issues, pull requests, repository hooks, and workflows.
You can trim this down to just the repositories you want.

Cloud sessions only work on repositories that already exist, so make the one we’re going to use: go to github.com/new, name it openai-blog-check, make it private, and check the box to add a README. The README is a placeholder of course, but it will start a new code branch, which is the bare minimum.

The GitHub Create a new repository form with the name openai-blog-check, visibility set to Private, and the Add README toggle switched on.
Private, README toggle on.

2. Create a cloud environment

Every cloud session runs inside a cloud environment: a saved bundle of network access, environment variables, and a setup script. It’s like a Mac Mini in the laundry room. Because our task involves the internet, we have to tweak the network access level. It may sound daunting but bear with me.

  1. At claude.ai/code, click the cloud icon in the row above the message box. That’s the environment selector; there’s no settings page for it.

    The environment selector menu open above the message box, listing Local (desktop only), Cloud, Self-hosted environments, and Remote Control, with Cloud highlighted and an Add cloud environment option beside it.
    Hover Cloud and the option to add one appears beside it.
  2. Click Add cloud environment.

  3. Name it something like openai-watch.

  4. Set Network access to Custom, and put one domain per line in Allowed domains:

    openai.com
    *.openai.com

    The * means anything, so www.openai.com or blahblah.openai.com would match, just in case.

  5. Check Also include default list of common package managers so you keep the Trusted list too. This will help us run the script we make Claude write.

  6. Leave Environment variables and Setup script empty.

  7. Click Create environment.

The New cloud environment dialog named openai-watch, with Network access set to Custom, openai.com and star-dot-openai.com in Allowed domains, the include default package manager list box checked, and empty Environment variables and Setup script fields.
Big scary dialog.

Once this is defined, we use the openai-watch for all our cloud things.

3. Ask for the script

Back at claude.ai/code, click the repository selector above the input box and pick openai-blog-check (that’s our code repository). Confirm the cloud icon says openai-watch (that’s our environment). Then paste something like this:

Write check.py, a Python 3 script with no third-party dependencies that fetches https://openai.com/news/product-releases/ and pulls out the list of posts — title, URL, and date for each.

Keep a seen.json file in the repo root holding the URLs it has already reported. On each run, print any post that isn’t in seen.json yet, one per line, then add it. Print nothing at all when there’s nothing new, and exit 0 either way. If the page can’t be fetched or the parse finds zero posts, print the error to stderr and exit 1 — I want a loud failure, not a quiet “no news.”

Add a short README section explaining how to run it and how to reset seen.json.

(How do you know to write something like this? You ask Claude how you would instruct Claude to create a Python script to fetch https://openai.com/news/product-releases/ for the purposes of this task. Whew.)

The Claude Code composer with the check.py prompt typed in, and three chips above it reading openai-watch, openai-blog-check, and main.
Make sure “openai-watch,” “openai-blog-check,” and “main” are above the box.

The session boots (starts) a container, clones (makes a copy of) the repo, and starts working.

It was pretty slow, especially with the “set up a cloud container” bit. Maybe it was time of day, maybe a watched cloud container never sets up, but it required a few page refreshes throughout. Not great.

A Claude Code cloud session listing its tool calls: set up a cloud container, cloned repository, started Claude Code, then Ran 13 commands above a list of fetch attempts that includes two failed calls shown in red, a wayback machine check, and several sitemap and user-agent probes.
Thirteen commands in, two of them are red. Is that good?

Anyhow it looks like the news page is behind Cloudflare, which is a Content Delivery Network (CDN) that guards against scraping and crawling and all that (pretty standard these days), so my simple script fails. It’s curious how we did NOT run into this with either of the scheduled tasks. Anyway, it did figure out that there was a generic RSS feed that was available and offered it as an alternative:

Claude Code pausing to ask a multiple-choice question about fetch strategy, offering option 1, use the RSS feed, marked recommended; option 2, fetch the HTML page as literally requested, which it notes will almost certainly return 403 every run; and option 3, Other.
Claude provides a reasonable alternative.

The RSS feed it found returns clean data. Fantastic.

4. Merge it

Claude works on its own branch, that is, a workspace where it can make code changes. However, we want to merge the code into the main branch if it looks good. It looks like it added 386 lines and removed 1 line:

The bar above the Claude Code message box showing the repository openai-blog-check, the branch claude/openai-news-scraper-od5l72, a plus 386 minus 1 diff indicator, and a Create PR button.
The branch name and the diff count both live in the bar above the input.

Then, in the session:

Merge the PR into main and delete the branch.

Or if you’re feeling adventurous, you can have it create a PR (Pull Request), go to GitHub, and merge it yourself.

5. Put it on a schedule

Now that we’ve got the code working, we need to add a routine in Claude Code. Go to claude.ai/code/routines and click New routine.

  • Name: openai-blog-check
  • Instructions: the prompt below
  • Repositories: openai-blog-check
  • Environment: openai-watch — again, not Default
  • Trigger: under Select a trigger, choose Schedule and pick hourly
  • Connectors: everything you’ve connected is included by default. Strip it down to nothing, or to just Slack if you want the ping below.

The instructions should look something like this:

Run python3 check.py from the repo root.

If it prints nothing, do nothing else — this run is a no-op and that is the expected case.

If it prints one or more new posts, open a GitHub issue in this repository titled “New OpenAI product release” whose body lists each new post as a markdown link with its date. Then commit the updated seen.json to main with the message “Record seen releases” and push.

If the script exits non-zero, open a GitHub issue titled “openai-blog-check is broken” with the stderr output, and do not touch seen.json.

The New routine form named openai-blog-check, with the instructions filled in, the repository and openai-watch environment attached below the instructions box, a Runs every hour trigger offering Once, Hourly, Daily, Weekdays, Weekly, and Custom with Hourly selected, and push and email notifications enabled.
The repo and the environment attach under the instructions box. Hourly is one click.

Click Create, then Run now on the routine’s detail page rather than waiting an hour to find out.

The routine detail page for openai-blog-check showing Active status, next run time, an Enabled toggle, the hourly trigger, the repository and openai-watch environment it runs with, the instructions, and a Runs panel reading No runs yet — run it once to check the instructions and connectors work before the first scheduled run — above a Run now button.
“No runs yet” even tells you to do this before trusting the schedule.

The first run is the interesting one, and this one did nothing at all — which is exactly what should have happened. seen.json was already current, so check.py printed nothing and exited 0, and the agent stopped there instead of inventing work to justify the run.

A completed routine run for openai-blog-check showing an Initialized session step and a Ran 2 commands step expanded into checking repo status and listing files, then running check.py and capturing the exit code, followed by the summary: No output, exit code 0 — this is the expected no-op case. Nothing else to do.
Exit code 0 sounds bad, but it’s actually fine.

Since we’re looking for changes, this is basically “nothing has changed.” For the purposes of this speedrun, this is fine. If I were an enterprising fellow, I’d really dig into the script and simulate a “new post” situation.

Conclusion

Following the rubric:

  • Remote — yes
  • Shareable with my team — yes and no. The code is shareable. The routine runs on my account though.
  • Schedule-able and active — yes
  • Learning and self-modifying — not quite in this state. For the routine it’s possible I could try “fix any errors you might run into,” but that is untested.
  • Easy to configure and run — absolutely not. As Claude Code suggests, this is absolutely coding and not normie-friendly.
C+

Claude Code in the cloud

It really failed the normie component and took a long time.

Back to Cloud Agents for Normies for the full list of what I’ve tried and how each one scored.