Venv often not triggered

Hey, thanks for the report. This is a known issue, a regression after the Cursor 2.0 release. The agent terminal is currently ignoring the python.terminal.activateEnvironment: true setting and won’t auto-activate the venv.

The team is working on a fix. For now, here are a few workarounds:

If you’re using uv, try explicitly adding this to .cursorrules or AGENTS.md:

When running Python code, use: uv run your_script.py
Don't use: source .venv/bin/activate && python your_script.py (doesn't work in agent terminal)

If you’re not using uv, you can add this to your rules:

Always use the full path to the Python interpreter: .venv/bin/python your_script.py

Similar discussion here: Correct Python interpreter - how hard can it be?