Notes - xsyetopz/claudetto GitHub Wiki

Notes

This page tells how the notes slice of the core plugin claudetto works. A user reads it to learn what a note above the prompt means and how to use its keys. A contributor reads it before an edit of slices/notes/. The slice makes no model call, so a note adds no request and no token to a turn.

What It Does for You

A note is one line above the prompt, such as Repeated deny · Bash(rm:*) stopped 3 calls. It stays for 2 prompts. Only one note shows at a time, and a newer note replaces the older one.

Where Notes Come From

  • The same permission deny or ask three times in one session. The note names the rule and the settings file that holds it.
  • The same check command fails three times in a row with the same failing test. The note names the test and the count.
  • A learn: block at the end of a main reply. The reply gives a learn: line, a tag: line, and an explain: block. The slice hides the block in the reply and shows <tag> · <line>. learn: none shows nothing.
  • The Stop hook of Finish, for a reply that defers work or says done with no proof.

Keys

Key What it does
1 Puts "Here is a note offered by a side agent:" and the note with its explanation into the prompt box.
2 Turns notes off.
3 Shows when notes are off, and turns them on again.

The keys work while the band above the prompt has the focus, and 1 also works in an empty prompt box.

Back-Off and Dedupe

When you type past n notes in a row, the slice skips the next 2^(n-3) notes for n of 3 or more, up to SKIP_MAX (16). A note whose line matches one of the last RECENT_MAX (50) lines shows nothing. Using the insert key ends the run of ignored notes.

Background Task and User Edit

  • A background task in flight for 30 minutes (BACKGROUND_MS). The API gives no start time and no output time of a task. So at each Stop the slice records the first time that it saw each ID of background_tasks, drops the IDs that are gone, and tells once per task. The rule counts the time in flight alone, and a task that prints output still gets the note.
  • A user edit in a file that the agent edits next. At an allowed Edit or Write, the slice runs git status for the file. When it shows a change and no line of the edit ledger of hygiene holds the hash of the file now, the note says that Claude did not make the change.

Hooks

Hook Filter What it does
tool.check Bash, Edit, Glob, Grep, Read, WebFetch, Write Counts denies and asks by rule, and checks an Edit or Write for a change of the user.
classic.Stop hook_event_name: "Stop" Records the background tasks and tells of one in flight for 30 minutes.
classic.PostToolUseFailure Bash Counts a failing check command.
classic.PostToolUse Bash A passed check ends its streak.
turn.step turnId (each step) Removes the learn: block from the shown and stored text of a main reply, and reads its note.
turn.complete None Takes the note of finish.
turn.start None Ages the shown note at each typed prompt of the main loop.
ui.render AbovePrompt Draws the note and its keys.
ui.render AssistantMessage Hides the learn: block.

Related Pages

⚠️ **GitHub.com Fallback** ⚠️