Skip to content

v2.4.2 — markdown add_cell false-timeout fix

Choose a tag to compare

@caidish caidish released this 04 Jul 09:14
· 4 commits to main since this release

Fix: notebook_add_cell(cell_type=\"markdown\") false timeout

Adding a markdown cell returned {\"success\": false, \"error\": \"Timeout waiting for frontend response after 2.0s\"} even though the cell was actually added. The frontend's extra changeCellType round-trip for markdown exceeds the old hardcoded 2.0s wait.

Changes

  • Configurable frontend-response timeout FRONTEND_RESPONSE_TIMEOUT (default 10s, overridable via INSTRMCP_FRONTEND_TIMEOUT), threaded through every bridge operation that waits on a frontend response (add_new_cell, move_cursor, get_active_cell_output, get_notebook_structure, get_cells_by_index, delete_cells_by_index).
  • Bridge-stability race fix: _send_and_wait now always pops-and-checks the response under the lock before declaring a timeout, so a valid response landing right as the wait expires is honored instead of discarded as a false failure.
  • Removed hardcoded timeout_s=2.0 in backend/notebook_unsafe.py and 3 core/notebook_tools.py read sites (one was even lowering the intended 10s to 2s).

Tests

  • New tests/unit/servers/test_add_cell_timeout.py (markdown slow-success at bridge + backend layers, plus the late-response race), verified red pre-fix / green on fix. Full unit suite green.