Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Whenever Cursor agent tries to run rails tests, it fails. It will always report back and say “no local MySQL”. This appears to be some limitation of how the agent runs commands.
My local MySQL server is a docker container. If I take the exact same command that Agent tried to run and paste it into my normal Cursor terminal, it works every time.
I’ve tried changing my Agent terminal settings:
- auto-run in sandbox and whitelist the commands (doesn’t work)
- run everything unsandboxed, still doesn’t work
Note: This used to work intermittently, but stopped working perhaps 2-3 weeks ago. Before, Cursor would try to run it in the sandbox and it would fail, then it would retry outside the sandbox and that would usually work. Now, nothing does.
Steps to Reproduce
Have a Rails app that uses a Dockerized MySQL server
Tell Agent to run tests
Watch it be unable to connect
Expected Behavior
Agent should be able to run operations that involve connecting to Docker containers on localhost
Screenshots / Screen Recordings
Operating System
MacOS
Version Information
Version: 2.6.20
VSCode Version: 1.105.1
Commit: b29eb4ee5f9f6d1cb2afbc09070198d3ea6ad760
Date: 2026-03-17T01:50:02.404Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0
For AI issues: which model did you use?
Affects all models
Does this stop you from using Cursor
No - Cursor works, but with this issue
