Skip to content

fix(companion): never store a raw session ID as the agent name - #1468

Merged
alvinunreal merged 1 commit into
alvinunreal:masterfrom
drakeo338:claude/1467-fix
Oct 6, 2026
Merged

alvinunreal merged 1 commit into
alvinunreal:masterfrom
drakeo338:claude/1467-fix

Conversation

@drakeo338

Copy link
Copy Markdown
Contributor

Fixes #1467.

When a session.status busy event arrived without an agent name, CompanionManager.onSessionStatus stored the raw session ID as the agent name. That ID then showed up in active_agents in the companion state, and the companion binary found no animation for it and drew the fallback image. It now falls back to orchestrator, the generic busy name, and the test covers the no-agent case.

Ran the companion manager tests on the committed HEAD: 60 passed, 0 failed (3 of the previous 57-pass run's tests failed before the change).

Herdr subagents report busy without an agent field. onSessionStatus
stored the session ID as the agent name, which the companion cannot
render. Fall back to 'orchestrator' instead, the same generic busy name
activeAgents() uses, so these sessions still show as busy.

Fixes alvinunreal#1467
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Changes how unnamed agent sessions are labeled in the UI.

The PR appears safe to merge; the remaining issue is a misleading test comment.

Findings

  1. P2 Test comment describes old fallback ▶

Summary

The PR replaces raw session IDs with orchestrator as the display name for busy sessions whose agent is unknown, and updates the companion manager tests. One test comment still describes the old fallback.

Reviews (1) · Last reviewed commit: "fix(companion): never store a raw sessio..."

Comment on lines 1001 to +1003
// ses_x is now tracked because Herdr subagents often lack
// the agent field; the session ID is used as a fallback name.
expect(readState().sessions[0].active_agents).toEqual(['ses_x']);
expect(readState().sessions[0].active_agents).toEqual(['orchestrator']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Test comment describes old fallback. The comment above this assertion says the session ID is used as the fallback name, but the test now expects orchestrator. This makes the test misleading for anyone checking how unnamed agents are displayed.

Suggested change
// ses_x is now tracked because Herdr subagents often lack
// the agent field; the session ID is used as a fallback name.
expect(readState().sessions[0].active_agents).toEqual(['ses_x']);
expect(readState().sessions[0].active_agents).toEqual(['orchestrator']);
// ses_x is now tracked because Herdr subagents often lack
// the agent field; orchestrator is used as the fallback name.
expect(readState().sessions[0].active_agents).toEqual(['orchestrator']);

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@alvinunreal
alvinunreal merged commit 951909d into alvinunreal:master Oct 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: companion stores raw session ID as agent name → fallback/unknown GIF

2 participants