Read tool rejects large .ipynb, blocking NotebookEdit; edit JSON instead
Claude Code's NotebookEdit requires a prior Read of the notebook, but Read renders the whole notebook including cell outputs and fails with 'File content exceeds maximum allowed tokens' once outputs grow (allow_large did not help here, and offset/limit do not apply to notebooks). A workable fallback: load the .ipynb with json, locate the cell by its 'id', replace exact TODO substrings (assert each occurs once), write back with json.dumps(nb, indent=1, ensure_ascii=False) plus a trailing newline to match Jupyter's formatting, back up first, and diff to confirm only that cell changed. If the notebook is open in VS Code, expect the IDE to auto-reload and re-save, which may add missing cell 'id' fields (nbformat 4.5); that is harmless, but an IDE save of a stale buffer would overwrite external edits.