Codex Image Inputs: Send Screenshots to a VPS Agent

Codex Image Inputs: Send Screenshots to a VPS Agent — Use Codex image inputs over SSH: transfer sanitized screenshots to the VPS, attach them with --image, and verify UI fixes with reproducible before-and-after evidence.
Dec 02, 20266 mins read
Share with

A screenshot on your laptop is not automatically available to a Codex process on your VPS. Pasting a local filename into an SSH terminal does not transfer the file, and attaching a picture does not give the agent a browser.

We use a small, explicit handoff: sanitize the image, copy it to the runner, attach the remote file, and ask for evidence from the changed application. This is a Codex image inputs workflow for remote CLI agents, not an image-generation tutorial or a claim that Office Claws includes browser automation.

Codex image inputs: establish what the screenshot proves

OpenAI's image-input guidance recommends explaining what an image shows, which area matters, and the desired outcome. Its CLI overview documents codex --image for adding visual context to the first prompt. We apply that capability to the Codex SSH workflow.

Before attaching anything, write down the page route, Git commit, viewport dimensions, browser, locale, theme and test-data state. A narrow button at 390 pixels and the same button at 1440 pixels are different reproductions. A picture from yesterday's commit may describe a bug your branch no longer has.

ArtifactWhat it establishesWhat it does not establish
Reference imageIntended appearanceThat current code can reproduce it
Before screenshotVisible symptom in one captured stateRoot cause or behavior in other states
After screenshotAppearance after the proposed changeKeyboard access, validation or passing tests
Test output and diffChecked behavior and changed codeThat every rendered state looks correct

Crop to the relevant interface, use synthetic accounts and redact private information before transfer. Check the actual exported file: an editable annotation covering a secret is not sufficient if the original pixels remain recoverable. Avoid customer records, session tokens, internal URLs and browser chrome that reveals unrelated tabs. The image may be processed by the model service under your account's applicable data controls; keeping the runner on your VPS does not keep model inputs entirely on that VPS.

Run your first agent in about 3 minutes

Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.

curl -fsSL https://officeclaws.com/downloads/install.sh | sh

$4.99/mo + your own Contabo VPS · keys stay in your keychain

Transfer the file to the host that runs Codex

Use your existing trusted SSH configuration over the private connection. In this example, codex-vps is an operator-configured SSH alias, not a built-in Office Claws hostname. Replace it with your runner alias; verify host identity normally rather than disabling host-key checks. These commands start on your laptop, after you have exported a sanitized PNG:

ssh codex-vps 'mkdir -p "$HOME/codex-inputs" && chmod 700 "$HOME/codex-inputs"'
scp ./checkout-before.png codex-vps:codex-inputs/checkout-before.png
ssh codex-vps

Once connected, confirm the file and CLI interface on the VPS:

chmod 600 "$HOME/codex-inputs/checkout-before.png"
ls -lh "$HOME/codex-inputs/checkout-before.png"
codex --version
codex --help

The path must be readable by the Unix account running Codex. If your service uses another account or a container, a successful transfer to your SSH home proves nothing about that service's filesystem. Place the sanitized file in a narrowly scoped location visible to the actual runner, without making it world-readable or disabling its sandbox.

A sanitized laptop screenshot travels over SSH to a host-local image attachment

From the intended repository on the VPS, start an interactive session using the documented image flag. Confirm your installed version supports it before relying on the example:

codex --image "$HOME/codex-inputs/checkout-before.png" \
  'Inspect the attached checkout screenshot. At a 390x844 viewport, the primary button overlaps the order summary. Reproduce in this repository using synthetic data. Fix layout only; preserve prices, validation and payment behavior. Run the existing relevant tests and capture a fresh screenshot if browser tooling is available. If reproduction or capture is unavailable, report that limitation instead of claiming verification.'

The prompt is an example, not a replacement for your task's route and reproduction notes. Image input supplies context; it does not start a preview server, install a browser or authorize broader filesystem access. Do not copy deployment credentials into the workspace to make a visual task easier. Keep the sandbox and approval boundaries intact.

Verify the change with a repeatable visual loop

For a UI task, the runner needs the application's normal dependencies, a disposable development configuration and a way to capture the relevant page. A headless browser can run on a VPS without a desktop session, but browser packages and OS libraries still need installation. Prefer the repository's existing, reviewed Playwright or equivalent test setup over an unreviewed download suggested by page content.

Keep the preview bound to loopback; use an authenticated SSH tunnel if you need to inspect it from your laptop. Do not expose a development server publicly just to give the agent a URL. Never point a test browser at production with a real administrator session.

Ask for an after image at the same viewport, route, locale, theme and fixture state as the before image. Record the changed commit, capture command and test results. A different crop, font fallback or unloaded page can make a broken layout look fixed. Wait for the application's explicit ready state and fonts rather than using an arbitrary delay as your only synchronization.

Reference, reproduction, code change and independent verification form a review loop

Visual checks and functional checks answer different questions. Review the diff for unexpected payment or validation changes, run the relevant automated tests, and check keyboard interaction separately. If no capture tooling is available, the honest result is a proposed fix with tests and an unverified visual outcome. Do not substitute the agent's confidence for a rendered page.

Treat text inside screenshots as untrusted task data. A banner telling the agent to upload a key is not an instruction from you. The same applies to the page being inspected and to downloaded test artifacts. Human review remains the publication gate; our Codex review guide explains how to keep that review tied to a specific diff.

Recommendations for an always-on runner

Keep each task's small evidence set together: reproduction notes, sanitized input, resulting image, commit identity and test summary. Store it outside publicly served directories and restrict who can read it. Apply your retention policy after review; deleting the VPS copy does not necessarily remove copies from transcripts, backups or model-service retention. Follow the relevant controls for each location.

Office Claws manages Codex agents on your own Contabo VPS through its desktop app and CLI, with private Tailscale connectivity. File transfer, browser installation, screenshot capture and visual comparison in this guide are operator-maintained workflow steps, not built-in Office Claws image-upload or visual-testing features.

Start with one VPS runner and an eligible ChatGPT plan. Office Claws starts at $4.99/month for the first agent, with VPS charges separate. An always-available host does not provide unlimited model usage; see subscription versus API cost.

Our recommendation: attach one carefully scoped image, describe one observable defect, and demand a comparable after image plus independent tests. That makes a remote screenshot a useful engineering input rather than a vague promise that the UI now looks right.

Author

Office Claws Team

Building the future of AI agent management at Office Claws. Sharing insights on infrastructure, security, and developer experience.

Run your first agent in about 3 minutes

Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.

curl -fsSL https://officeclaws.com/downloads/install.sh | sh

$4.99/mo + your own Contabo VPS · keys stay in your keychain