Codex-style CLI sandbox

Codex CLI local GCP sandbox

For Codex-style coding CLIs, treat LocalCloud as the deterministic local cloud runtime and the CLI as the code-editing operator. The important contract is explicit: local Docker is allowed, real Google Cloud credentials are not required for default verification.

Fact

Works with terminal agents that can run Docker and project tests.

Fact

Keep setup instructions in prompt text because Codex-style CLIs differ by distribution.

Fact

Use /ai/agents.md as the stable remote operating contract.

Platform caveat

Do not assume persistent tool state

Some Codex-style workflows run in fresh shells or constrained environments. Make the agent print which env vars are active before it runs tests, and prefer checked-in scripts only after the local path is proven.

Safe default

Localhost endpoints before code changes

Ask the CLI to prove SDK routing with one local operation before it edits application code. That prevents a successful unit test from hiding an accidental call to googleapis.com.

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.

Codex CLI prompt
Use LocalCloud as the GCP runtime for this task. Fetch https://local.cloud/ai/agents.md, start or reuse the local Docker container, confirm emulator env vars in the shell you will use, then run one localhost SDK or API check before editing code. Never request real GCP credentials for this local validation.
Limitations

Use the sandbox deliberately

  • CLI installation, sandboxing, and approval behavior varies by Codex-compatible client.
  • LocalCloud validates local API and SDK behavior; release candidates still need real Google Cloud validation.
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.