Cursor sandbox

Cursor local GCP sandbox

Cursor is useful when the agent can reason over an IDE workspace and edit files quickly. LocalCloud gives those edits a concrete local GCP target so agent-written code can be exercised through Google Cloud SDKs before a human pushes to a real project.

Fact

Best for workspace-aware edits plus an integrated terminal test loop.

Fact

Keep emulator env vars in the terminal/session running tests.

Fact

Use repository-local instructions to prevent real-cloud fallbacks.

IDE caveat

The editor and terminal may not share state

Cursor can edit files and run commands, but environment variables must be present in the process that executes tests. Have the agent echo emulator env vars immediately before the SDK check.

Repo instruction

Prefer a project-local note once proven

After the first successful LocalCloud run, ask Cursor to add concise project instructions only if the repository already uses an agent instruction file. The instruction should say localhost endpoints are the default local test target and production deploys require real GCP validation.

Copy-ready setup

Commands and prompts

Use these snippets as starting points, then keep the checks scoped to localhost until you intentionally validate against real Google Cloud.

Cursor agent prompt
Inspect this workspace for Google Cloud SDK usage. Use https://local.cloud/ai/agents.md to start LocalCloud, set emulator env vars in the terminal that will run tests, and validate one local operation. Do not add real GCP credentials or production project IDs.
Limitations

Use the sandbox deliberately

  • Cursor-specific background agent environments can differ from the visible terminal.
  • Do not store fake local env vars in files that production jobs source without safeguards.
Next routes

Keep the agent on the supported path

  • Compatibility matrix — Check current support boundaries before relying on a local-only test.
  • Service catalog — Review every LocalCloud service, endpoint, and limitation.
  • SDK examples — Use standard Google Cloud SDKs pointed at localhost.
  • Seed data — Load deterministic fixtures for repeatable agent and CI runs.