/ctx-watch:ctx-watchfrom ctx-watch
Check, repair, or install the watch on the ctx daemon when a session says "ctx-watch:", the person asks whether ctx is up, ctx search fails or falls back to lexical, or a Stop said "resumed without consulting history"; not for ctx searches themselves.
Ships in ctx-watch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The ctx daemon keeps the local agent-history index fresh. It has died quietly before (its
launchd job had not loaded, and agent shells carry CI=true, under which ctx refuses to start
one). This plugin's check says whether it is running, supervised, fresh, and its semantic
index ready, and repairs what ctx documents a command for; install sets up the launchd timer
that watches it between sessions; the Stop hook's consult-history check says when a resumed
session never asked ctx about the thread. Use this skill when a SessionStart line begins
ctx-watch:, when the person asks whether ctx is running, when a ctx search reports a stale or
unavailable daemon or semantic_status: unavailable, or when a Stop line says resumed without consulting history.
node "${CLAUDE_PLUGIN_ROOT}/scripts/ctx-watch.mjs" check --json. Read ok, reason,
fix, and healed.detail. ok: true means running, supervised, and refreshed within 2 h;
say so in one line and stop.ok is false and the reason begins upgrade in progress, a ctx upgrade is handing the
daemon over: say so and do nothing; ctx upgrade status --format json shows its state. If
the reason says ctx upgrade stuck, or ok is false with healed.attempted true and the
daemon still down, run the /ctx-watch:repair skill (it runs
node "${CLAUDE_PLUGIN_ROOT}/scripts/ctx-watch.mjs" repair, which refuses during a live
upgrade and pauses and restores the timer). If repair refuses or fails, hand the person its
last line and the fix command for their own Terminal.healed.detail begins not attempted, say why (indexing mode manual, ctx not set up
under this HOME, or the daemon is running; \ctx index mode auto` does not touch the
semantic index) and leave the decision to the person; ctx index mode autoturns the daemon on,ctx setupcreates an installation, andctx semantic enable --wait(thefixof athe ctx semantic index is not readyreason) starts model indexing and waits forready. The semantic fix is never run by the plugin and should not be run from here: it can take minutes and the person's own Terminal shows its progress. Until it is ready, ctx search still answers, lexically (semantic_status: unavailable` in its JSON): say so instead of
calling history unavailable.ctx-watch: timer has not run since …, ctx-watch: timer not in launchd gui/<uid> or ctx-watch: timer's script no longer exists, run
node "${CLAUDE_PLUGIN_ROOT}/scripts/ctx-watch.mjs" install and hand the person the printed
launchctl bootstrap gui/<uid> <plist> line (or the bootout + bootstrap pair, when install
prints one) to run from a GUI login Terminal. Never run launchctl bootstrap yourself; the
timer belongs to their login session. The plist goes to ~/Library/LaunchAgents, where
login loads it again after a reboot.node "${CLAUDE_PLUGIN_ROOT}/scripts/ctx-watch.mjs" status shows the last tick, the episode
(up, strike, down, with the last popup shown, pending, or not shown), the plist path, and whether
launchd has the job, for a report. prune (same script) rotates the logs under
${XDG_STATE_HOME:-~/.local/state}/ctx-watch and removes rotated ones older than 30 days;
the nightly canary runs it, so it is rarely needed by hand.ctx-watch: resumed without consulting history — \ctx search --refresh off ''`(orsaid "as discussed" …), the session picked a thread up without reading what ctx holds on it. Run that ctx search --refresh off(or the ctx MCPsearch) now and read the hits before going on; --refresh offnever starts, wakes or recovers the daemon. The topic is the first six words of the prompt and may want sharpening (a barectx search --refresh offmeans the transcript held no prompt: add the thread's subject). Inblockmode the Stop was refused with the same command in the reason; running it clears the next Stop. The mode is~/.claude/ctx-watch.json {"checks": {"consult-history": "off" | "warn" | "block"}}(defaultwarn); touch ~/.claude/.ctx-watch-off` turns this Stop check off. The flag does
not reach the SessionStart line or the launchd timer's popup: those keep reporting the
daemon and the semantic index. Change neither without the person's say-so.check printed ctx-watch: ctx could not run: ctx is not on PATH; fix: …: ctx is not
installed where this shell looks. Tell the person; ctx docs show getting-started is the
install doc once ctx exists, and the plugin cannot do more without it.check printed ctx-watch: ctx could not run: <path> does not exist (pinned at install; …):
the ctx the timer was installed with has moved. Run step 4's install again (it pins the
ctx now on PATH, or --ctx <path>) and hand over the printed bootout-and-bootstrap line.check printed ctx-watch: check timed out after 3000 ms (…) or … did not answer in N s:
ctx is hung or very slow; the daemon's state is unknown, not healthy. Tell the person and
ask them to run ctx daemon status --format json in their own Terminal.check printed core_refresh in the future or invalid .daemon.jobs.core_refresh.last_run_at_ms:
the clock or ctx's stamp is wrong. Show the value from check --json and do not call it
healthy.check printed ctx-watch: … printed no JSON …: ctx answered in a shape this plugin does not
read (a newer ctx, or an error). Show the person the first line of ctx's output from
check --json and do not call it healthy.install printed plutil not found or launchctl not found / launchctl could not run: not
macOS, or a sandbox refused them. The plist was still written; tell the person to run
install again from a normal Terminal, or to lint and bootstrap the printed path by hand.install exited 1 (interval must be … (30 to 604800 s), no executable \ctx` on PATH, --ctx … is not an
executable file, plutil -lint failed`): say the line; a lint failure is a bug in this
plugin, so give the person the plist path to attach to an issue.tick printed popup not shown: … or popup not delivered: …: the dialog could not open
or failed after it started (no GUI session, no osascript); it is tried again on the next
failing tick. Nothing to do unless it repeats while the person is logged in, then tell them
the reason. status saying popup up since …, not confirmed yet is a dialog that may still
be on screen; it is not a failure.status or tick printed state not written to <path>: the state directory or its lock is
not writable (could not lock …: EACCES), or (… state.lock is held by pid <n>, or still contended after <ms> ms) another tick was writing it. Tell the person
the path; the probe and the line still work without it, but no popup starts until the state
can be written.check printed ctx-watch: the ctx semantic index is not ready (…); fix: \ctx semantic enable --wait`(abudget_exhaustedindex whose last run was itselfbudget_exhaustedorready, under 2 hours ago, is the throttled indexer resting between runs and is not reported; this line means something else; semantic index budget_exhausted: last run …means that resting shape has no fresh last run, and names the same fix): the daemon is up but hybrid search is lexical only. Hand the person the fix for their own Terminal (step 3); do not run it from here.ctx semantic status --format json` shows the
reason in detail if they ask.check printed ctx-watch: \ctx daemon status --format json` has no .daemon.jobs.semantic_index; fix: `ctx semantic status`: a ctx whose status output this plugin does not read (older or newer than 2.3.0). Tell the person to run ctx semantic status` by hand and open an issue naming the ctx version.ctx-watch SessionStart failed open: <why> or ctx-watch Stop failed open: <why>: the hook let the session go on without its check; the line is also in
${XDG_STATE_HOME:-~/.local/state}/ctx-watch/errors.log. Tell the person once, and run step 1
(or, for Stop, the ctx search --refresh off of step 6 with the prompt's words) by hand.evals/stop-resume-warn.scenario.json; the block form is
evals/stop-resume-block.scenario.json; a turn that did call ctx is silent,
evals/stop-resume-ctx-consulted.scenario.json) where you did consult history through a subagent: the check
reads this session's transcript only (a subagent's mcp__ctx__search is isSidechain, or in
its own file). Say what the subagent found, in this thread, and move on; that is the point
of the check.ctx search --refresh off on a resume by their own rule (the shipyard ctx-first guard), not by this
hook. Say so if asked why it did not fire.~/.claude/ctx-watch.json is not JSON, or names a mode that is not off, warn or block:
one errors.log line and the check runs as warn. Show the person the line and the file; do
not rewrite the file for them.no such file): the plugin is not installed where CLAUDE_PLUGIN_ROOT
points. Tell the person; ctx daemon status --format json read by eye (.daemon.running,
.daemon.supervisor.status, .daemon.jobs.core_refresh.last_run_at_ms) is the check by hand,
and say that you did it that way.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub thewolff/jo-wolff-plugins --plugin ctx-watch2 skills in this plugin