A one-line fix for senpi: the herdr sidebar agent-label bug
While writing about repository collaboration between agents, I noticed something odd in herdr’s sidebar. Other panes showed agent names such as claude and hermes, but the OmO pane showed its conversation’s session name. Renaming the session also changed the agent label.
The executable fix was one line. Getting that line into a PR still meant finding the boundary between the product and engine repositories, writing a test that caught the wrong behavior, and following the repository’s change-log and QA rules.
A manual label change did not last
Section titled “A manual label change did not last”I first changed the label manually with herdr’s pane report-metadata --display-agent. The desired name appeared briefly, then the next report overwrote it. Editing the displayed value could not outlast the component that kept reporting it.
The affected setup was OmO Native, whose actual engine is senpi. The herdr protocol identifies this pane’s agent kind as pi. The goal was not to change that kind, but to separate the sidebar’s agent label from the session title.
The cause was two fields in reportTitle
Section titled “The cause was two fields in reportTitle”The reporting code was in packages/coding-agent/src/core/extensions/builtin/herdr/index.ts. The builtin herdr extension’s reportTitle read the session name and sent it through pane.report_metadata. It placed that same name in both title and display_agent.
| Field | Intended value | Value in this bug |
|---|---|---|
title | Session name | Session name |
display_agent | Sidebar agent label | Session name |
Protocol agent | Agent kind | pi, not part of the change |
herdr uses display_agent for the agent label in its sidebar. Reporting a renamed session therefore also replaced the label with that session name. The same reporting path explained why a manually assigned label did not persist.
The product issue and fix PR belonged in different repositories
Section titled “The product issue and fix PR belonged in different repositories”The product I use is OmO, so I first reported the symptom and cause in code-yeongyu/oh-my-openagent#11397. The faulty code, however, lived in the engine repository, code-yeongyu/senpi, not the product repository.
I forked senpi and worked on fix/herdr-display-agent-label. I opened senpi#4582 and left a link to the fix on the original issue. The PR is titled fix(herdr): keep the sidebar agent label on the branded command.
Because the issue and PR are in different repositories, merging the PR may not automatically close the original issue. Acceptance of the code and resolution of the reported product problem need to be checked at their respective links.
One line separated the two names
Section titled “One line separated the two names”Rather than adding a setting, I used the existing branded command, APP_COMMAND. It is omo under OmO and senpi for standalone senpi. The session name stays in title, while display_agent receives that command.
if (!(await send("pane.report_metadata", { title: next, display_agent: next })) && title === next)// The sidebar's agent label names the launcher; the session name belongs only in the title.if (!(await send("pane.report_metadata", { title: next, display_agent: APP_COMMAND })) && title === next) title = undefined;This changes one executable line and adds one explanatory comment. The protocol agent kind remains pi. Correcting the sidebar label does not require changing agent detection or reporting a different lifecycle kind.
I also considered a user-extension workaround. A user reporter named herdr-*, however, makes the builtin reporter defer entirely, rather than yielding only one field. That would require reimplementing all state reporting just to replace a label. I chose to fix the builtin reporter that was sending the wrong value.
Testing both startup and rename
Section titled “Testing both startup and rename”The new packages/coding-agent/test/suite/herdr-display-agent.test.ts uses it.each to exercise the omo and senpi brand commands. It checks both pane.report_metadata requests, at startup and after a rename: title must carry the session name, while display_agent must remain the brand command. This is the central assertion.
it.each(["omo", "senpi"])("labels a %s pane with its branded command, not the session name", async (command) => { launcher.command = command; const f = await herdrReporterFixture(); await f.start(); f.setTitle("Renamed"); await f.emit("session_info_changed", { name: "Renamed" }); expect(f.requests.filter((r) => r.method === "pane.report_metadata").map((r) => r.params)).toMatchObject([ { title: "Reporter QA", display_agent: command }, { title: "Renamed", display_agent: command }, ]);});The existing herdr-reporter.test.ts had one assertion that expected the session name in display_agent. I changed it to assert only title and moved the branded-label assertion into the new test.
During the contribution, three herdr test files passed with 37 tests, and bun run check passed lint, formatting, and type checks. Temporarily reverting the fix also made the new test fail. This checked that the test caught the pre-fix behavior, rather than merely adding another passing test. These are execution records from the contribution, distinct from the public GitHub check results below.
The fix commit is 08bc8004.
Change records belonged in a fragment, not the original logs
Section titled “Change records belonged in a fragment, not the original logs”I initially wrote directly into the extension’s changes.md. The rules in senpi’s AGENTS.md and changes/unreleased/README.md required something else: the change-fragment workflow introduced in senpi#3610.
A PR must not edit an existing changes.md or a package CHANGELOG.md [Unreleased] section directly. Open PRs used to edit the same top lines, so merging one caused conflicts in the others. Each PR instead adds one changes/unreleased/<PR-number>.md file.
Within that file, <!-- changes-log: <path> --> identifies the destination log. A tracker block contains a dated entry and four canonical sections. A package CHANGELOG block contains a category such as ### Fixed and a summary bullet. This is the actual submitted fragment.
<!-- changes-log: packages/coding-agent/src/core/extensions/builtin/herdr/changes.md -->## 2026-10-28 - Keep the sidebar agent label on the branded command (oh-my-openagent#11397)
### What changed
- `packages/coding-agent/src/core/extensions/builtin/herdr/index.ts` reports `display_agent` as the existing `APP_COMMAND` brand command instead of the session name; `title` still carries the session name.
### Why
- Herdr renders `display_agent` as the pane's agent label in its sidebar. Reporting the session name there hid which agent owned the pane (other panes read `claude`, `hermes`, ...) and the label changed on every rename. OmO now reads `omo`, standalone Senpi reads `senpi`; the protocol agent stays `pi`.
### Why an extension could not handle it
- `packages/coding-agent/src/core/extensions/builtin/herdr/index.ts` is the builtin reporter that owns the metadata report. A user `herdr-*` reporter makes the builtin defer entirely, so it would have to reimplement all state reporting.
### Expected merge conflict zones
- LOW: the `pane.report_metadata` payload in `reportTitle`.
<!-- changes-log: packages/coding-agent/CHANGELOG.md -->### Fixed- Herdr's sidebar labels OmO and Senpi panes with their command (`omo`, `senpi`) instead of the session name ([#4582](https://github.com/code-yeongyu/senpi/pull/4582))The filename requires a PR number, so I created the fragment after opening the PR. I used the repository’s conversion script to restore the original log and move the same entry into the fragment.
node scripts/sync-changes-fragments.mjs from-diff --base origin/main --pr 4582After adding the CHANGELOG Fixed bullet, I committed it as 77b32916. The final PR changes index.ts, two test files, and one fragment.
At release time, scripts/release.mjs compiles fragments into the original logs and deletes them. .github/workflows/changelog-gate.yml and scripts/check-pr-changelog.mjs enforce the per-PR rules. This describes repository policy; it does not establish that this gate has successfully run on this particular PR.
Running the real CLI with an empty settings directory
Section titled “Running the real CLI with an empty settings directory”senpi’s AGENTS.md requires scoped tests, bun run check, and real CLI QA for Runtime changes. Receipts belong under local-ignore/qa-evidence/<date>-<slug>/ and must not be committed. The PR carries decisive excerpts and a SHA-256 for each evidence file instead.
The installed omo still used the pre-fix engine, so I launched the modified source with the OmO brand. This was the QA command. An empty temporary settings directory kept the actual settings untouched.
OMO_CODING_AGENT_DIR="$(mktemp -d)" \ SENPI_BRAND='{"name":"omo","command":"omo"}' \ ./pi-test.sh --no-env--no-env runs without API keys. Since herdr reports at session startup, checking this bug did not require a model response. Inside the running CLI, I renamed the session and read the pane metadata. The ! prefix executes a shell command.
/name QA rename!herdr pane currentI used a separate QA workspace without taking focus from the existing panes, then closed it afterward. At the project-trust prompt, I chose not to trust the project for that session. The environment was herdr 0.9.5 on macOS arm64.
| Comparison after rename | display_agent | title |
|---|---|---|
| Before, installed omo 5.1.48 | QA rename | QA rename |
| After, PR branch | omo | QA rename |
The fixed version reported display_agent as omo from startup and kept it after the rename. The evidence was not a sidebar screenshot, but output of the field herdr uses for that sidebar label. The QA comment on the PR records the before-and-after output and the hashes of the locally retained evidence files.
Current PR state and verification boundaries
Section titled “Current PR state and verification boundaries”I queried the VM’s gh pr view, gh issue view, and gh api at 12:07 KST on 2026-10-29. Both issue and PR were OPEN, with PR head 77b32916. No PR reviews had been submitted. The API reported mergeable_state as blocked, but that value alone does not establish which requirement blocks the merge.
The public checks on that PR head were:
| Check | Result |
|---|---|
| Review claim gate | SUCCESS |
| GitGuardian Security Checks | SUCCESS |
| cubic · AI code reviewer | NEUTRAL |
| Register claimer as reviewer | SKIPPED |
| Release claim on claimer review | SKIPPED |
| Sweep stale review claims | SKIPPED |
This list did not contain results for unit tests, bun run check, or the changelog gate. I therefore do not turn the contribution’s 37 passing tests into a claim that all GitHub CI passed. Public checks, local tests, and real CLI QA are separate evidence. These checks also do not establish upstream acceptance or an updated installed release.
The agent needed repository rules first, too
Section titled “The agent needed repository rules first, too”I worked on this contribution with Claude Code. Initially the session had not loaded the repository’s AGENTS.md and edited changes.md directly. Only after moving the session into the repository and loading the rules did it discover the fragment workflow. The commits credit the agent with a Co-Authored-By trailer.
For the next contribution, I intend to have the agent read CONTRIBUTING.md and AGENTS.md before changing code. Even a one-line fix included the test location, change-record format, and real QA receipts in the project’s unit of contribution. Making that line reviewable in the project’s own terms mattered as much as correcting the label.
References
Section titled “References”- Product issue: oh-my-openagent#11397
- Engine fix PR: senpi#4582
- Fix and tests:
08bc8004 - Fragment conversion:
77b32916 - AGENTS.md at the PR head
- Change-fragment rules at the PR head
- Real CLI QA comment on the PR