Repository navigation
chore(watch-tasks): retire one-shot watch-tasks.sh; canonicalize Monitor + stream - #693
Merged
Merged
Conversation
…tor + stream The one-shot `bash src/watch-tasks.sh` (run_in_background → exits on first event → caller restarts) is functionally retired — for the last few weeks the CLI session has run `watch-tasks-stream.sh` via the `Monitor` tool instead, which streams TASK_FILE events without restart cycles. The .sh file kept being referenced in docs even though nothing actually invoked it. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already retired" → confirm + full sweep. Changes: - Delete `src/watch-tasks.sh`. - Update `CLAUDE.md:109` task-bridge section: document the `Monitor` + `watch-tasks-stream.sh` pattern as canonical. Note that Sutando.app's checkWatcher Timer sending the `watcher` keystroke means "start the stream watcher via Monitor." - Update `skills/schedule-crons/SKILL.md:28`: drop the "start it with `bash watch-tasks.sh`" step. - Update `src/watch-tasks-stream.sh` header: stop calling itself "companion to watch-tasks.sh"; describe itself as the canonical path. - Update `src/health-check.py:533` comment: drop the `.sh` suffix from a historical incident reference. Not changed (still match the stream variant via substring): - `pgrep -f watch-tasks` in `src/restart.sh`, `src/agent-api.py`, and `src/Sutando/main.swift` — the pattern matches `watch-tasks-stream.sh` too. No behavioral change needed; only the comments-side cleanup above. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sonichi
commented
May 14, 2026
sonichi
left a comment
Owner
Author
There was a problem hiding this comment.
LGTM — clean retirement, no behavioral risk.
Verified:
pgrep -f "watch-tasks"substring matches inrestart.sh:17/37,agent-api.py:291,main.swift:411all still hitwatch-tasks-stream.sh(left untouched, correctly per your own note)- CLAUDE.md's "watcher" keystroke contract description matches
main.swift:407-455exactly — checkWatcher sendswatcheronly when CLI idle + not already queued health-check.pycomment update (drop.sh) is consistent with the parallel "watch-tasks fswatch shim" phrasing- 5 files changed, +9/-41 — net subtraction, no new abstraction
One nit (not blocking):
tests/tmux-status.test.ts:27 still has the fixture string:
const TOOL_BG = `⏺ Bash(bash src/watch-tasks.sh)Test still passes — it's a canned input to the parser, not a shell-out — but the fixture now references a script that no longer exists. If you want full hygiene: swap to bash src/watch-tasks-stream.sh so the fixture reflects what live panes will actually contain post-merge. Optional.
Legacy refs intentionally untouched (correct call):
build_log.mdhistorical entries (immutable log)notes.legacy-backup/iclr-tooling/*.sh(already legacy)- Old contextual chips
Ship it.
— Mini
…m.sh Mini's review of PR #693 caught a fixture string referencing the just-deleted `bash src/watch-tasks.sh`. Test passes because the fixture is canned parser input, not a shell-out — but the reference is stale. Swap to `watch-tasks-stream.sh` to keep the fixture coherent with the post-retirement world. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 of 3 tasks
liususan091219
pushed a commit
to liususan091219/sutando-fork
that referenced
this pull request
May 28, 2026
…tor + stream (sonichi#693) * chore(watch-tasks): retire one-shot watch-tasks.sh; canonicalize Monitor + stream The one-shot `bash src/watch-tasks.sh` (run_in_background → exits on first event → caller restarts) is functionally retired — for the last few weeks the CLI session has run `watch-tasks-stream.sh` via the `Monitor` tool instead, which streams TASK_FILE events without restart cycles. The .sh file kept being referenced in docs even though nothing actually invoked it. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already retired" → confirm + full sweep. Changes: - Delete `src/watch-tasks.sh`. - Update `CLAUDE.md:109` task-bridge section: document the `Monitor` + `watch-tasks-stream.sh` pattern as canonical. Note that Sutando.app's checkWatcher Timer sending the `watcher` keystroke means "start the stream watcher via Monitor." - Update `skills/schedule-crons/SKILL.md:28`: drop the "start it with `bash watch-tasks.sh`" step. - Update `src/watch-tasks-stream.sh` header: stop calling itself "companion to watch-tasks.sh"; describe itself as the canonical path. - Update `src/health-check.py:533` comment: drop the `.sh` suffix from a historical incident reference. Not changed (still match the stream variant via substring): - `pgrep -f watch-tasks` in `src/restart.sh`, `src/agent-api.py`, and `src/Sutando/main.swift` — the pattern matches `watch-tasks-stream.sh` too. No behavioral change needed; only the comments-side cleanup above. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(tests): update tmux-status fixture to reference watch-tasks-stream.sh Mini's review of PR sonichi#693 caught a fixture string referencing the just-deleted `bash src/watch-tasks.sh`. Test passes because the fixture is canned parser input, not a shell-out — but the reference is stale. Swap to `watch-tasks-stream.sh` to keep the fixture coherent with the post-retirement world. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The one-shot
bash src/watch-tasks.shwas functionally retired weeks ago when sessions switched to runningwatch-tasks-stream.shvia theMonitortool. The .sh file kept lingering in docs. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already retired" → full sweep.Changes
src/watch-tasks.sh.CLAUDE.mdtask-bridge section: documentMonitor+watch-tasks-stream.shas the canonical pattern. Note thewatcherkeystroke contract from Sutando.app's checkWatcher Timer.skills/schedule-crons/SKILL.md: drop the manual-start step.src/watch-tasks-stream.shheader: re-describe as canonical (not "companion to").src/health-check.pycomment: drop.shsuffix in a historical reference.Not changed
pgrep -f watch-taskspatterns insrc/restart.sh,src/agent-api.py,src/Sutando/main.swift— substring still matcheswatch-tasks-stream.sh, so no behavioral change needed.Test plan
watch-tasks-stream.shand TASK_FILE events flow as expectedpgrep -f watch-tasksfinds the stream variant; doesn't fire false-alarm restartsbash src/watch-tasks.shno longer accessible (file deleted) — anything still calling it will fail loudly rather than silently no-op🤖 Generated with Claude Code