Startup UX: lifecycle flag + warming-aware skill/doctor#25
Merged
Conversation
…ng, not broken
First start can spend minutes installing + loading models; anything touching
the missing socket claimed the system was broken with stale from-source
advice. Now:
- The daemon publishes ~/.agent-mem/daemon.state ({phase, pid, since}):
"warming" right after PID acquisition, "ready" once the priming socket is
serving, removed on shutdown (pid-guarded so a rejected duplicate can't
erase the live daemon's flag).
- The ultan-search skill triages a missing/unanswering socket instead of
failing hard: state flag w/ live pid or fresh spawn stamp → "starting up,
retry shortly, run `ultan doctor`"; install lock/pid in the plugin data
dir → "still installing"; otherwise an honest "down — lazy-starts on the
next prompt" (from-source advice demoted to a footnote).
- `ultan doctor` prints the phase line (e.g. "daemon phase: warming
(since …)") when the flag is present and matches the live pid.
Tests: daemon state lifecycle (3), skill triage incl. dead-pid flag (5).
Root 23 / daemon 657 green, thin-CI-env simulation green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The fallback already worked during warmup — silently. Now every consumer
phrases it honestly via the new _daemon.status() ('ready'/'warming'/'down',
one socket probe + the lifecycle flag + spawn-stamp breadcrumbs):
- Hook priming appends "*daemon still warming — lexical-fallback results;
ranked recall returns within a minute or two*" to the bullets.
- MCP ultan_recall prefixes the same note (a warming "no match" may just
mean the ranked index isn't serving yet).
- A stale state flag with a dead pid never claims warming.
Tests: 5 status-classification cases (incl. a real AF_UNIX listener for
'ready') + note-present/note-absent on the hook path. 30 root tests green
in both the full dev venv and the simulated thin CI env.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Relocate the Quick start block to sit right after "Why this exists" so readers hit install steps before the design/architecture detail. Pure move, no content changes. Co-Authored-By: Claude Opus 4.8 (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.
First start (cold install + model load) read as "broken" — the search skill hard-failed on the missing socket with stale from-source advice. This adds a daemon lifecycle flag (
~/.agent-mem/daemon.state: warming → ready, pid-guarded cleanup), warming/installing-aware triage in the ultan-search skill pointing atultan doctor, and a phase line in doctor itself.🤖 Generated with Claude Code