# Besydr 0.4.0: Claude Code compaction guidance, Config page

> Source: <https://besydr.com/blog/besydr-0-4-0>
> Published: 2026-11-28 00:00:00+00:00

**Key takeaway:** Besydr 0.4.0 sends Claude Code and OpenCode instructions on which tool results to drop before compaction, costing one extra decision-model call per compaction and falling back to unguided compaction if the model is unreachable or exceeds 25 seconds.

# Besydr 0.4.0: Claude Code compaction guidance, Config page

Besydr runs beside a coding agent such as Claude Code, Codex, OpenCode, pi or octomind. It checks the agent's claim that the work is done, stops tool calls that go against what you said, and learns lessons from your sessions for later ones. Version 0.4.0 guides the summary a client writes when it compacts a long conversation, adds a Config page for Besydr's settings, keeps activity from the first recorded day, and tells sessions a person watched from sessions a program ran. Your config file upgrades itself the first time 0.4.0 loads it.

## Guidance for Claude Code and OpenCode compaction

When a conversation gets long, the client folds the old messages into a summary. That is a compaction. Much of what gets folded is tool results: the output of one action the agent took, such as a command or a file read.

Before Claude Code or OpenCode compacts, Besydr now asks its decision model which earlier tool results the current task still needs. The decision model is the model Besydr uses for its small yes-or-no decisions. Besydr then sends the client instructions for the summary: leave out the results the task no longer needs, and keep the details the remaining work depends on, such as names, paths, error text and numbers.

This costs one extra decision-model call per compaction. If the model cannot be reached, or takes longer than 25 seconds, Besydr sends nothing and the client compacts as it would have. In Claude Code the guidance applies to the main session, not to subagents. Codex and pi have no place in their hooks for such instructions. Octomind already asks Besydr which results to drop before it compacts.

The guidance is on by default. `compaction` in the `[decision]` section switches it off.

[How it works](https://besydr.com/docs/mechanics) has the details.

## Settings on the record page

`besydr ui` opens the record page: a page in your browser that shows what Besydr did in your sessions. It is served on your machine only. The new Config page shows every setting of Besydr's config file as a form, with the comment the file has above each setting. A switch above the form shows the raw file text instead, and you can edit either one.

Nothing is saved until you click Save. A value that does not fit its setting is refused with a sentence that says what is wrong, and your edits stay on the page. If the file changed on disk since the page read it, the save is refused. Comments and the other values in the file stay where they are. Save writes the file and restarts the Besydr server, so the new settings take effect. Requests that other connected agents are running at that moment are cut.

The main model and the decision model each have a Choose… button. It lists the providers from the same catalog as `besydr configure`, says for each one which key variables are not set, and then lists that provider's models.

[Configuration](https://besydr.com/docs/configuration) describes every setting.

## Activity from the first recorded day

`besydr stats` and the record page read Besydr's activity record. In 0.4.0 that record is a database file on your machine. Records from earlier versions are brought in once, by themselves. The record page has a new period, All, next to 7, 30 and 90 days: everything from the earliest recorded day.

Each session's full timeline, every event in order, is kept for 14 days by default. After that the events are removed, but the daily counts, tokens and costs stay, and so do completion checks, stopped tool calls, lesson activity and failures. The 14 days is now a setting, `timeline_days` in the `[activity]` section, which must be at least 1. A smaller number removes the older events. Events already removed do not come back with a larger one.

Work an agent hands to a helper agent, a subagent, now counts under the session that started it: its checks, model spend and outcomes. [The record page](https://besydr.com/docs/cli#ui) describes each page.

## Sessions nobody was watching

A rule Besydr learns counts as yours, kept with your exact words, only when a person was at the terminal. Some sessions run with no person: a one-shot scripted run, or a session another program writes to. Their messages are a brief that program wrote, not your words.

Before 0.4.0, every Claude Code, Codex, OpenCode and pi session counted as watched. Now Besydr reads what each client reports. Claude Code says whether someone is at the front end. For Codex, Besydr reads which front end started the session: the terminal, the IDE extension or the desktop app. OpenCode says whether a session is a helper session, pi reports its mode, and octomind sends it directly.

A rule quoted from a session nobody watched is kept as an ordinary lesson of the project, not as your rule. It is used only for requests it bears on, it never applies to all your projects, and it is not sent to a team. [Clients](https://besydr.com/docs/clients) lists what each client reports.

## Fixes

- **Octomind after a server restart.** After the Besydr server restarted, for example after an update, a running octomind session could show "plugin 'besydr' did not answer session.end: plugin 'besydr' closed the connection" and lose one event. The connection now ends with the server, and octomind opens a new one for its next event. A test reproduces the old failure, so it fails the build if it comes back.
- **Overview totals.** They now include the stored daily totals of days whose full events are gone.

## Limits

- The compaction guidance works only in Claude Code's main session and in OpenCode.
- Telling watched from unwatched sessions depends on what each client reports. OpenCode cannot tell its terminal app from a scripted `opencode run` , so its main sessions always count as watched. Claude Code builds that do not report it count as watched. Octomind's WebSocket mode counts as unwatched, even when a person uses it.
- Events removed after the timeline window cannot be shown again.
- On Windows, Besydr has no local socket server, so Save on the Config page writes the file and restarts nothing. A running server keeps its settings until it starts again.

## Upgrading to 0.4.0

`besydr update` installs 0.4.0 when your licence includes it, and Besydr also checks once a day by itself. A copy installed with Homebrew is upgraded with `brew upgrade besydr`.

The config file upgrades itself to version 3 the first time 0.4.0 loads it. Your values stay, and the new settings get their defaults: compaction guidance on and 14 days of timeline. The old file is kept beside the new one, and Besydr prints one line naming both files.

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