# Besydr 0.6.0: quoted rules for tool calls and controls for learned rules

> Source: <https://besydr.com/blog/besydr-0-6-0>
> Published: 2026-11-30 10:13:55.042219+00:00

**Key takeaway:** Besydr 0.6.0 replaces full prior messages in the quick tool-call check with quoted rules, cutting quick-check input from 3.06 million to 0.52 million tokens and missed should-stop calls from 8 of 48 to 1 of 48.

# Besydr 0.6.0: quoted rules for tool calls and controls for learned rules

Besydr runs beside a coding agent to check its work, stop actions that go against your instructions, and learn from your sessions. Version 0.6.0 checks proposed actions against short quotes from your instructions, shows the progress and results of searches for new rules, and keeps unchecked cases open during a review of finished work. Keep your current config file.

## The tool-call check

A tool call is an action the agent asks to take, such as running a command. Before the action runs, Besydr checks it against what you allowed, as one of its AI agent guardrails. It now turns your earlier messages and the agent's role instructions into a short list of bans and limits on what the agent can do. Each rule keeps the exact words and where they came from. The quick check reads that list in place of the full earlier messages. The final check, which reviews calls the quick check flags, gets the same quotes. It can cite a ban even if the original message had to be shortened.

When making the list, Besydr asks the model to account for every line that sounds like an instruction, with words such as “never”, “must” or “only”. The model says whether the line sets a rule and quotes it if it does. If the answer fails that check, Besydr asks again. If the next answer also fails, the quick check reads the original text. Besydr reads long messages in consecutive parts and can reuse the rules from the same agent role in later sessions when the model is also the same. If your current message is too large for the quick check, Besydr can give it the quoted rules and a shortened copy so it can still screen calls from that request.

### Labelled evaluation

The evaluation used 18 conversations, each run 3 times, with known rules and tool calls marked in advance as ones to stop or allow. “Before” uses the 0.5.0 tool-call check. “After” uses the 0.6.0 tool-call check. Both use `deepseek-v4.1-flash` from isoquant as the main model and `jev-latest` from typesafe as the decision model for the quick check. The tables count the text sent to a model in tokens, the pieces of text it reads.

| Measure | Before | After | 
|---|---|---|
| Rules kept in the list | 46 of 54 | 53 of 54 | 
| Calls that should have been stopped but were allowed | 8 of 48 | 1 of 48 | 
| Calls stopped that should have been allowed | 0 of 54 | 0 of 54 | 
| List not ready in time | 3 of 54 | 0 of 54 | 
| Besydr's model cost per case | $0.0036 | $0.0019 | 
| Besydr's model cost, whole evaluation | $0.195 | $0.104 | 
| Text sent to the quick check, in tokens, whole evaluation | 3.06 million | 0.52 million | 
| Quick-check cost, whole evaluation | $0.1285 | $0.0218 | 

The new check caught the ban hidden in a long paste and the ban hidden in a long current request in every run of those cases. The case that still slipped through asked the agent to send a report to a named address. Both versions missed it in 1 of 3 runs. With the new check, the list missed the recipient on that run. The line naming the address had no instruction word.

### Full benchmark

The 2026-11-30 benchmark run used Claude Code with `claude-opus-5-5` and Codex with `gpt-6.2-sol`. The before columns come from a run on the earlier tool-call code. In the developer scenario, each client worked through 32 requests in one round with all of Besydr on. The count of rules broken covers the 29 requests after the first session.

| Developer scenario | Claude Code before | Claude Code after | Codex before | Codex after | 
|---|---|---|---|---|
| Requests solved | 30 | 31 | 30 | 30 | 
| Rules from earlier sessions broken | 0 | 0 | 3 | 0 | 
| Corrections the developer had to give | 5 | 5 | 11 | 6 | 
| Besydr's model cost, whole run | $0.263 | $0.250 | $0.300 | $0.257 | 
| Tool-call check input tokens, whole run | 612,085 | 550,588 | 727,870 | 483,577 | 
| Tool-call check cost, whole run | $0.040 | $0.038 | $0.052 | $0.033 | 

The same benchmark also compared each client on its own and with all of Besydr running on the new code. The developer scenario ran once, so treat both comparisons as indicative.

| Developer scenario | Claude Code without Besydr | Claude Code with Besydr | Codex without Besydr | Codex with Besydr | 
|---|---|---|---|---|
| Rules from earlier sessions broken | 16 | 0 | 11 | 0 | 
| Corrections | 18 | 5 | 14 | 6 | 
| Client cost at API prices | $48.92 | $36.87 | n/a (subscription, tokens only) | n/a | 

The permissions scenario gave each client 7 requests across 6 sessions, with 2 rounds per client. The requests included shell calls the agent was forbidden to make and ones it was allowed to make.

| Permissions scenario | Claude Code before | Claude Code after | Codex before | Codex after | 
|---|---|---|---|---|
| Wrongly stopped calls | 0 | 0 | 0 | 0 | 
| Tool-call check calls per request | 5.71 | 5.36 | 8.43 | 7.36 | 
| Tool-call check input tokens per request | 5,638 | 4,810 | 9,327 | 6,198 | 

The tables leave out elapsed time. The main model's provider answered about twice as slowly in the 2026-11-30 run across all kinds of calls, with Besydr on and off. The median for the completion check, which judges the agent's finished work, went from 6.5 s to 11.5 s.

## Rule generation

Besydr keeps instructions and corrections from your sessions as lessons. It can turn those lessons into rules for later work, such as a skill that tells the agent how to carry out a recurring task. Open `besydr ui` and choose **Skills & rules** to filter rules by kind or state, read their text and history, see trial results, or retire a rule.

**Look for new skills now** starts a search through your lessons. The page shows when the search is running and whether it found new rules, found none or failed. If rule generation is off, or the model that writes the rules cannot guarantee an answer in the required format, the button is disabled and the page tells you what to change under **Config**.

New rules appear as **Watching**. Besydr records when they would apply before it tries them on live work. Before watching a skill, it checks when the skill would appear in recent requests from other sessions in the same project and holds it back if it would appear too often. In a trial, the page shows results for sessions run with the rule and sessions run without it. Each session now contributes at most one result for that rule, from the first completion check after the rule applies or would have applied. If that check yields no score, the session contributes no result. When a saved session resumes, Besydr remembers the rules it encountered and whether it already counted a result. The page shows average model requests for the checked turn only when it has request counts to show.

[Command line](https://besydr.com/docs/cli#ui) describes the record page, and [Learning](https://besydr.com/docs/learning#generated-rules-evolution) explains how Besydr tries and keeps rules.

## Completion-check fixes

When a request names several cases, each still needs evidence during review. For example, if you asked for empty names and duplicate names to be rejected, a check for empty names can settle that case while the duplicate case stays open. Besydr names the cases it could not verify. The agent can point to an existing check or worked example, or report what remains unverified. A prohibition the agent obeyed by leaving something alone needs no extra demonstration.

With review notes on, Besydr can ask again if the list of open cases changes and there is room for another review. If the same cases remain, the review ends with those cases marked unverified. A confirmed gap can still send the agent back to work. [Mechanics](https://besydr.com/docs/mechanics#completion-check) describes the possible outcomes.

## Limits

- The tool-call check depends on the client giving Besydr a chance to stop an action before it runs. A rule can still be missed, as in the report-recipient case.
- The measured costs apply to the models and requests in these runs. The developer benchmark was a single round, and the change in provider response time makes the elapsed times unsuitable for comparison.
- Rule generation requires a model that can guarantee the answer format. Trials also need the completion check to score them.

## Upgrading to 0.6.0

`besydr update` installs 0.6.0 when your licence includes it. By default Besydr also checks for updates on its own. For a copy installed with Homebrew, run `brew upgrade besydr`.

The bundled rules page updates with Besydr. If you wrote a client that reads its rule list, replace the `evolution_enabled` field with `generation_blocked` in your client. The new field gives the reason when generation is blocked and is null when it can run.

On the first start after upgrading, trials in progress start over and rules already in use go back to **Watching** so they can be tried again under the new way of counting sessions. Besydr does this automatically.

After the update, run `besydr restart`. Then restart OpenCode and pi sessions, which keep a connection to Besydr for the whole session. Downloads and the full list of changes are on the [Releases](https://besydr.com/releases) page.
