ClawCloud Run published this notice: [Important Notice] Update on Idle Resource Reclamation Policy for Free Plan Users (https://question.run.claw.cloud/questions/10010000000002545) .

In plain words: free-plan resources that stay idle for too long may be reclaimed. If you want to keep your free resources available, you need reliable periodic access.

This post explains a simple open-source setup:

What This Setup Does

The workflow is short:

  1. Val Town triggers on a cron schedule (for example, once every week).
  2. Val Town calls Vercel POST /api/keepalive.
  3. Vercel runs browser automation and signs in to ClawCloud Run with your GitHub account.

This is not bypassing policy. It is regular access automation within policy boundaries.

Prerequisites

  • A GitHub account with Authenticator 2FA enabled
  • A Vercel account
  • A Val Town account

Critical requirement: collect GITHUB_OTP_SECRET first

When enabling GitHub 2FA, follow this order:

  1. Open Settings -> Password and authentication -> Two-factor authentication.
  2. Choose Authenticator app.
  3. On the QR/setup page, reveal and copy the setup key (base32). Save it as GITHUB_OTP_SECRET.
  4. Then scan the QR code and finish verification.

If you skip saving the setup key, automated TOTP generation will fail later.

Step-by-Step Setup

1) Fork and Deploy to Vercel

  1. Fork the repository to your own GitHub account.
  2. Import it in Vercel and complete the first deployment.

2) Add Vercel Environment Variables (mark as Sensitive)

Required variables:

  • CRON_SECRET: auth secret for Val Town -> Vercel API (use a long random value)
  • GITHUB_USERNAME: your GitHub username or email
  • GITHUB_PASSWORD: your GitHub password
  • GITHUB_OTP_SECRET: your base32 setup key
  • CLAW_SIGNIN_URL: your own data-center sign-in URL (example: https://eu-central-1.run.claw.cloud/signin)

Save and redeploy.

3) Configure Val Town Cron

  1. Create a Val and paste valtown/main.ts.
  2. Set Val Town env vars:
    • VERCEL_URL=https://<your-project>.vercel.app/
    • CRON_SECRET=<same value as Vercel>
  3. Set a weekly schedule in Val Town UI.

How to Verify It Works

Check both logs:

  • Val Town: scheduled main.ts runs
  • Vercel: /api/keepalive returns 200

If you get 401, CRON_SECRET is usually mismatched. If you get 500, check GitHub credentials, GITHUB_OTP_SECRET, and CLAW_SIGNIN_URL.

Security Notes

  • Never commit .env.
  • Mark sensitive variables as Sensitive in Vercel and Val Town.
  • If a secret appears in public logs, rotate immediately:
    • CRON_SECRET
    • GITHUB_PASSWORD
    • GITHUB_OTP_SECRET

Final Takeaway

For users impacted by the new idle reclamation policy, this project is practical because it is:

  • low cost
  • easy to maintain
  • fully automated for weekly keepalive

For most free-plan users, this is a straightforward and robust keepalive approach.