Skip to content

search_replace on .ipynb files reports success but does not persist changes when notebook is open in editor #27

@qihaopku-spec

Description

@qihaopku-spec

DescriptionWhen using search_replace to edit a Jupyter notebook (.ipynb) that is open in the IDE, the tool reports a successful diff but the change is not actually persisted. Reading the file back (via run_in_terminal with json.load) shows the original content unchanged.Steps to Reproduce
Open a .ipynb notebook in the IDE (Qoder)
In Agent mode, use search_replace to modify cell source code (e.g., change result[f"{pair_label}_{num_col}"] to result[num_col])
The tool returns a successful diff showing the expected change
Read the file back via run_in_terminal with python3 -c "import json; ..." — the original text is still there
The notebook in the editor also shows no change
Expected Behaviorsearch_replace should modify the notebook cell source and the change should be visible both on disk and in the editor, similar to how it works for .py files — or how Cursor's notebook cell editor works (targeting cell index with old/new string, writing through the editor's document model).Actual BehaviorThe tool operates on a virtual/extracted view of cell sources but the change conflicts with the editor's in-memory notebook state, which overwrites the disk. The edit silently disappears.WorkaroundClose the notebook tab before making edits via run_in_terminal (Python JSON rewrite), then reopen. This is disruptive and requires kernel restart.Environment
OS: macOS 15.6.1
IDE: Qoder (Agent mode)
File type: .ipynb (Jupyter Notebook)
SuggestionIntegrate notebook editing with the IDE's document model (similar to Cursor's approach) so that search_replace on .ipynb files writes through the editor's internal state rather than bypassing it.
You can copy this directly into a new issue. Would you like me to adjust the wording?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions