"Jupyter Notebook Cell Duplication and Type Conversion During Edits"
Bug Description When Claude is editing Jupyter Notebooks with a simple code update, it can sometimes duplicate the cell, and the fixed cell is no longer a code cell. This gets quite confusing as it appears after the fixed cell, so it looks like nothing has happened.
Environment Info
- Platform: macos
- Terminal: pycharm
- Version: 1.0.22
- Feedback ID: 8d5e0603-21f1-43b7-8bb2-80cbc06b7261
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at zZ (file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n at file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:8871\n at Q (file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n at tJ (file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:8017)\n at XS (file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:7098)\n at O6 (file:///Users/stephen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:11210)","timestamp":"2025-06-13T16:13:38.439Z"}]
Curious if the model encounters errors trying other mechanisms before it adds the cell as a text cell? For example, did it first try editing a cell, but for some reason that failed and after a few times it finally adds the cell with the incorrect type?
I don't think so in this case. I think the issue might be that i had the notebook open, and had run cells (until one broke). In one case, I fixed a kwarg name (which Claude had got wrong), but then when the fix for the cell was applied, the kwarg was unfixed (by Claude). So, perhaps Claude didn't re-read the file (or the Jupyter notebook reader i see mentioned)
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Fair enough bot. But this wasn't resolved