Skip to content

/cheap: fix stale skill list, wasted keep-warm refreshes, per-message disk write - #31

Merged
Darknode-Official merged 1 commit into
mainfrom
fix/cheap-audit
Nov 13, 2026
Merged

Darknode-Official merged 1 commit into
mainfrom
fix/cheap-audit

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

An audit of /cheap for slowdowns and bugs. Nothing in it slows replies; three bugs fixed.

Fixed

  • The unused-skill list went stale. It only refreshed when /cheap was typed, so a skill you started using later stayed name-only. It now refreshes after claude messages, at most once a day and in the background.
  • Keep-warm could refresh a cache the next message wouldn't read. After a /model, /effort or a setting change, the next message sends a different prompt start, so the refresh was wasted. Keep-warm now compares the launch the next message would make with the last one and skips the refresh if they differ. Models are compared as models, so fable and claude-fable-5-2 count as the same. The launch options are now built in one place for both.
  • The skill list was rewritten to disk on every message. It is now written only when it changes.

Measured, no change needed

  • The daily skill scan read 2.7 GB of transcripts in 3.3 s and never blocked the screen for more than 16 ms.
  • Changing which skills are trimmed keeps the cache. On Haiku, the next two messages after a change still read the full context.

HOME=/tmp/nxhome-full npm test: all suites pass (2 new tests).

- The unused-skill list only refreshed when /cheap was typed, so it went
  stale: a skill you started using later stayed name-only. It now
  refreshes (at most daily, in the background) after claude messages.
- Keep-warm reused the last launch even after /model, /effort or a
  setting changed the prompt, so it could refresh a cache the next
  message would not read. It now compares the launch the next message
  would make with the last one and skips the refresh when they differ
  (the model is compared as a model: "fable" vs "claude-fable-5-2").
  The launch options are built in one place for both.
- The skill list was rewritten to disk on every message; now only when
  it changes.

Measured, no change needed: the daily skill scan reads 2.7 GB of
transcripts in 3.3 s and never blocks the screen for more than 16 ms;
changing which skills are trimmed keeps the cache (Haiku: full prefix
read on the next two messages).
@Darknode-Official
Darknode-Official merged commit ee11895 into main Nov 13, 2026
6 checks passed
@Darknode-Official
Darknode-Official deleted the fix/cheap-audit branch November 13, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant