Cursor composer/agent can't edit yaml files

:lady_beetle: Description

The file edit tool in Cursor exhibits inconsistent behaviour when modifying different file types (yaml specifically):

  • Successfully modifies Python files (both simple and complex)
  • Fails to modify YAML files
  • Works correctly for creating new files (python, txt)

:counterclockwise_arrows_button: How to Reproduce

  1. Try to modify a Python file:
# Create a test file
echo "def test(): pass" > test.py

# Try to modify it using the edit tool
# Result: Success - file is modified correctly
  1. Try to modify a YAML file:
# Create a test file
echo "name: test" > test.yaml

# Try to modify it using the edit tool
# Result: Failure - no changes are applied
  1. Try to create a new file:
# Try to create a new file using the edit tool
# Result: Success - file is created correctly

:laptop: Environment

  • OS: macOS (darwin 24.3.0)

  • Cursor Version:
    Version: 0.46.9
    VSCode Version: 1.96.2
    Commit: 3395357a4ee2975d5d03595e7607ee84e3db0f20
    Date: 2025-03-05T08:14:11.312Z (1 day ago)
    Electron: 32.2.6
    Chromium: 128.0.6613.186
    Node.js: 20.18.1
    V8: 12.8.374.38-electron.0
    OS: Darwin arm64 24.3.0

:prohibited: Impact on Usage

The issue does not completely stop usage of Cursor, but it creates inconvenience when:

  • Modifying YAML configuration files
  • Updating GitHub Actions workflows
  • Working with any YAML-based configuration

Additional Context

The tool successfully handles:

  • Simple Python files (e.g., src/logger.py)
  • Complex Python files (e.g., src/config.py)
  • New file creation (python, txt)
  • Proper indentation and formatting
  • Docstrings and type hints

The issue appears to be specific to YAML files, not complex files in general, as demonstrated by successful modifications of complex Python files.

Workarounds available:

  • Use terminal commands for YAML modifications
  • Handle YAML modifications manually

Restart/reboot doesn’t help

This is SO ANNOYING! I can’t use cursor in Github Actions workflow templates at all! Fails to make the edit every time.

1 Like

Facing the same

Seems resolved in Version: 0.46.10