block / block/berd

Editing a bundled agent is undone on restart

Open
#142 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
909
Forks
116
Avg merge
1d 1h
Merged PRs (30d)
156

Description

### Before filing

- [x] I searched open and closed issues for duplicates.
- [x] I reproduced this on the latest release.
- [x] This is one bug, not several bundled together.

### Closest existing issue

none found

### What is broken

Harness and model settings saved for a bundled agent are replaced by the packaged defaults the next time Berd starts.

### Steps to reproduce

1. Launch Berd.
2. Open Agents and edit a bundled agent.
3. Select a harness and model, then wait for the edit to save.
4. Quit and reopen Berd.
5. Reopen that agent.

### What you expected to happen

The selected harness and model persist across restarts.

### What actually happened

The agent returns to its packaged configuration and the saved `provider`, `modelProviderId`, and `model` fields disappear.

### How often does it happen?

Every time — reliably reproducible when a previously seeded bundled agent differs from its packaged copy.

### Berd version

0.6.2

### Operating system

macOS 26.5.2, Apple Silicon

### Model and provider

n/a — this occurs in agent configuration before any chat turn.

### Relevant log output

```text
[2026-08-20][05:45:47][berd_lib][INFO] Seeded 7 bundled agent(s)
```

### Screenshots, recordings, or other context

The editor preserves `metadata.berdBundled: true`. At startup, `should_install_agent` refreshes any previously seeded, still-marked file whose bytes differ from the packaged source. `install_agent_file` then atomically replaces the edited file. The repository test `replaces_edited_seeded_agent_before_launch` confirms this behavior.

User-owned routing fields need to survive bundled-agent refresh, or editing a bundled agent should convert it to a personal copy.

Contributor guide

Open the contributing guide

Research direction

Start with should_install_agent and install_agent_file, then read the repository test replaces_edited_seeded_agent_before_launch. Reproduce the restart flow for an edited bundled agent and trace how metadata.berdBundled and the provider, modelProviderId, and model fields are handled. Done means the selected harness and model persist after reopening Berd, with the relevant test passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.