Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Observe Long-Running Agents Playing Simple Computer Games

Overview

Run Claude with the computer use tool in an isolated desktop container, let it play a simple game such as 2048 for a long, capped session, and log every move and screenshot so you can study how it plays.

Problem or Objective

More in Games and Simulations

AI Agents and Models

Tools and Integrations

Tools
Claude API · Docker
Prerequisites
A Claude API key, a container or virtual machine to act as the desktop, and code that runs the computer use loop. Check which models support the current computer use tool version and its cost per request.

How It Works

Set up an isolated desktop in a container or virtual machine with minimal privileges and no logins or personal data on it. The Computer Use Demo in Anthropic's claude-quickstarts repository is one way to build this. Install or open a simple single-player game, such as an open-source 2048 clone, that runs locally inside that desktop. Limit internet access to an allowlist, or turn it off. Give Claude a short brief: the game's rules, the goal, and that it should take a screenshot after each move and note its reasoning briefly. In your agent loop, set a maximum number of turns, a time limit and a spending cap, and save every action, screenshot and score to a log file. Start the session, check in periodically, and stop it at the cap. Afterwards, read the log to see where play improved, stalled or repeated, and run the same setup again to see how much the results vary.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude computer use.
  2. Connect the toolsConnect the tools this workflow relies on: Claude API, Docker.
  3. Check the prerequisitesA Claude API key, a container or virtual machine to act as the desktop, and code that runs the computer use loop. Check which models support the current computer use tool version and its cost per request.
  4. Gather your detailsCollect what the prompt asks for: The game, Short rules, What counts as success, Move cap per session.
  5. Run the starter promptPaste the starter prompt below into Claude computer use and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at platform.claude.com before you rely on it.

Practical Starter Prompt: Play the game and log each move

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
You are playing [The game] on this desktop. The rules: [Short rules]. Your goal is [What counts as success]. Before each move, take a screenshot, then make one move and state in one sentence why you chose it. Do not open a web browser, other apps or any settings. Stop when the game ends or after [Move cap per session] moves, whichever comes first, and report your final score.

Run it only inside the isolated container, with turn, time and spending caps set in your loop, and save every action and screenshot for review.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Anthropic's documentation says the computer use tool gives Claude screenshot capabilities and mouse and keyboard control for autonomous desktop interaction, with your application performing each action on your own container or virtual machine. The quickstarts README describes the Computer Use Demo as an environment and tools Claude can use to control a desktop. No cited page reports game scores or how play changes over hours, so treat each run as an observation, not a benchmark.

Limitations and Considerations

Anthropic recommends a dedicated virtual machine or container with minimal privileges, keeping login details away from the model, limiting internet access to an allowlist of domains, and asking a human to confirm decisions with real-world consequences. It also warns that instructions in web pages or images can override yours, so keep the game local. Long sessions send many screenshots through the API, so check the cost per request and set a hard spending limit before you start. Check the game's licence before recording or publishing runs. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

Suggested Implementation Component

A repository that could serve as a building block. It is not part of the cited account and is not evidence that the workflow was run.

Sources

  1. Computer use tool - Claude Platform Docs (opens in a new tab)

    Project documentation · platform.claude.com · Undated · Source checked 25 Nov 2026, 12:00 UTC

    What this source supports
    • Claude can interact with computer environments through the computer use tool, which provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
    • Using a dedicated virtual machine or container with minimal privileges to prevent direct system attacks or accidents.
    • Limiting internet access to an allowlist of domains to reduce exposure to malicious content.
  2. anthropics/claude-quickstarts README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • An environment and tools that Claude can use to control a desktop computer. This project demonstrates how to leverage the computer use capabilities of Claude.
    • To use these quickstarts, you'll need an Claude API key.
Report a problem

More with Claude computer use

Planned, not done

Complete a Sample Tax Form With Computer Use

Have Claude's computer use tool fill a blank practice copy of a tax form inside an isolated virtual machine, using figures from a local file, then check every line yourself before anything is filed.

platform.claude.com
Planned, not done

Test Visual Computer Use on a Domestic Flight Search

Try Claude's computer use tool in Anthropic's reference container on a real task: have it search a travel site for a one-way domestic flight and report the options it found, stopping before any booking step.

platform.claude.com
Planned, not done

Assemble a Complex Multi-Node Workflow through Computer Use

Run Claude's computer use tool in an isolated container and have it build a large n8n workflow node by node in the n8n editor from your written spec, with no real credentials, then test every branch yourself before publishing.

platform.claude.comn8n-io/n8n

View all: Claude computer use