About this use case
The poster runs Cursor agent mode on a real project, including a Twilio voice agent, using containers, hooks and safeguards to protect the environment.
What they did
The poster runs Cursor agent mode inside a per-feature devcontainer with Docker Compose services for the app, Postgres, Redis, and a Cloudflared sidecar, plus forwarded ports for a Twilio voice agent’s web UI and websocket endpoint. Secrets are injected from a dedicated 1Password vault, while destructive actions stay behind host SSH agent biometric approval, so the agent can use CLI commands and work autonomously but can’t safely touch main or the host environment.
Prompt
Help me run Cursor agent mode safely on my project [project name]. Set up a dev container so the agent works in isolation, add hooks that block risky commands like [rm -rf, force push, or access to .env secrets], and keep secrets such as [API keys] out of its reach. Finish when I can run a test task inside the container and see a risky command get blocked. Show me each config change before you apply it.
Reported outcome
The result was a setup where they could leave Cursor running on real tasks and either return to finished work or delete a broken container with no damage outside that isolated stack. It still needed extra safeguards beyond Cursor’s built-in protections, and Cloudflare Bot Fight Mode had to be disabled for some ChatGPT-facing use cases.
Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.