Repository navigation
fix(doctor): report a broken Python; wake idle sessions for notes - #16
Merged
Merged
Conversation
A teammate's dev doctor crashed on 26.11.11: their Homebrew Python 3.15.2 cannot load pyexpat. The jobs module now loads without it, dev doctor's first row names each native module devkit needs that does not load, with the fix, and a failure reading the jobs is a failed row instead of a crash. Root cause: jobs.py imported plistlib when the module loaded, plistlib needs pyexpat, and that Python's pyexpat was built against a newer macOS SDK than the Mac's /usr/lib/libexpat, so importing jobs from doctor raised ImportError (jobs.py:17, setup.py doctor) Verified: python3 and /usr/bin/python3 -m unittest tests.test_doctor: OK; tests.test_jobs_audit: OK; dev test prove: the 3 new tests fail without the change, one with the teammate's pyexpat error
The kit-consulting session's note about a teammate's crash reached the idle devkit session only when the developer wrote. A note to a session with no wait armed now notifies the developer (at most once per ten minutes per session), the sender is told which sessions are not waiting, and the turn checklist of a Claude main session asks for dev watch --wait --standby while other sessions run on this Mac. Root cause: send() notified the developer only for a question or an urgent note, so a plain note to an idle session with no wait reached nobody until its next prompt; the sender's output did not say the receiver was not waiting; and nothing asked an idle main session for the standby wait that peer notes wake (peers.py send, peerscli.py _send, hooks.py turn_checklist) Verified: python3 and /usr/bin/python3 -m unittest tests.test_peers tests.test_peerscli tests.test_hooks_peers tests.test_threaded_turn_endings tests.test_watch_peers: OK; dev test prove: the 4 new tests fail without the change
Version 26.11.13 in VERSION and the three manifests, and its CHANGELOG section: dev doctor reports a Python whose native modules do not load instead of crashing, and a note from another session reaches an idle session. Verified: dev docs check CHANGELOG.md: 0 issues, links resolve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Two problems reported on 2026-11-10. A teammate's
dev doctorcrashed on devkit 26.11.11: their Homebrew Python3.15.2 cannot load
pyexpat(built against a newer macOS SDK than the Mac's ownlibexpat), and the jobs moduleimported
plistlib, which needs it, as it loaded. And a note from another agent session (the kit-consulting session'sreport about that crash) waited unread in an idle session until the developer wrote: a plain note notified nobody.
Changes
jobs.pyimportsplistlibonly where it writes a launchd file, so the module loads withoutpyexpat.dev doctor's first row importspyexpat,ssl,sqlite3,zlib, andctypesin a process of the same Pythonand names each one that fails, with its error and the fix (
uv python install 3.13 --default); a jobs check thatfails is a failed row instead of a crash.
dev session tellsays which sessions are not waiting; a Claude Code session's end-of-turn checklist asks fordev watch --wait --standbywhile other sessions run on this Mac.How to verify
dev ci --runpassed 7 of 7 steps (compile, unit tests, gitleaks, semgrep, osv-scanner, trivy, zizmor)on tree 9bbf120.
tests.test_doctor,test_jobs_audit,test_peers,test_peerscli,test_hooks_peers,test_threaded_turn_endings, andtest_watch_peerson Python 3.15 and the system Python 3.9: OK.dev test prove: the 7 new tests fail without the change; one fails with the teammate's own error("Standard library module 'pyexpat' was not found" when
plistlibloads).Risk and rollback
Low: one import moved, one doctor row added, one block made to report instead of raise, and the peer notification
widened from questions to notes, still throttled. Roll back with
dev install --version 26.11.12.Links
CHANGELOG.md, section 26.11.13need a design and are not in this release.