Critical Architecture Limitation in Cursor Execution Model

Dear Cursor Dev Team,

We’ve identified a critical structural issue that requires agent-level architecture changes, not simple LLM prompt adjustments:


Root Cause:

  • Cursor’s terminal command execution model does not persist cwd (current working directory) across steps.
  • Directory changes (cd backend) are lost between steps because the execution agent resets context.
  • As a result, commands run incorrectly from project root (/), despite proper LLM instructions.
  • The problem is invisible to users unless they inspect or manually test, leading to silent, dangerous bugs.

Why This Matters:

  • Project builds, database migrations, server startups, and deployments all rely on correct cwd.
  • Incorrect cwd leads to:
    • Wrong dependencies being installed
    • Broken file reads/writes
    • Silent test failures
    • Security vulnerabilities

This makes large-scale automation unreliable without deep manual babysitting.


Required Changes:

  1. Persistent Session Directory Tracking: Execution agent must maintain working directory context between commands.
  2. Explicit Directory API: Allow users to programmatically inspect, set, or change the working directory.
  3. Terminal Context Logging: Each executed command should log the cwd for verification and debugging.

Conclusion:

Without solving this, Cursor cannot safely automate fullstack development workflows at scale.
This is a blocker for serious production adoption.

We urge prioritizing this architecture change urgently.

Thank you for your consideration.