Skip to content

feat(chat): show a chat's agent, label and sender from the CLI - #740

Merged
edenreich merged 3 commits into
mainfrom
feat/chat-agent-label-sender
Nov 23, 2026
Merged

edenreich merged 3 commits into
mainfrom
feat/chat-agent-label-sender

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

When the researcher agent was asked to message the tester agent, the message turned into a subagent nested under the researcher's chat. The tester agent showed (0) chats, and the sidebar never said which subagent was spun up.

The CLI change in inference-gateway/cli#1942 lets an agent message another agent's orchestrator. The recipient starts in a top-level chat of its own, and every session records agent, label and sent_by. This reads those fields from infer conversations list.

Depends on inference-gateway/cli#1942. Merge it after a CLI release that contains it, with .cli-version moved there (gh workflow run bump-cli.yml). Until then agent-message.yaml cannot pass.

Changes

  • Filed under the agent - a top-level chat the listing names an agent for is filed under that agent.
    • The sidebar store merges listedAgentOf(conversations) under its own agentOf assignments, so the count, opening the chat as that agent, the model bar and the chat's computer (chatWorkspace) all agree.
    • Only the user's own assignments are saved to projects.yaml.
    • Subagents and main chats are skipped.
  • Label badge - a subagent row shows the label its orchestrator gave it as a badge before the title. The title and the Delete conversation <title> label are unchanged.
  • Row tooltip - chatOrigin builds it: invoked by orchestrator: <parent> as <label>, sent by <chat> or invoked by human.
  • Message card - the recipient's chat opens on [Message from <sender>], which the transcript already shows as a Message from card.
  • Tests - unit tests for listedAgentOf and chatOrigin. A new e2e/tests/agent-message.yaml with two mock scenarios: e2e-sonnet messages e2e-docs-writer, whose chat must appear under e2e-docs-writer and above e2e-sonnet.
  • Docs - docs/chat.md (subagent labels, the row tooltip) and docs/agents.md (agents messaging each other).

The e2e tests were not run locally. The new test needs the CLI from inference-gateway/cli#1942 (INFER_BIN). The badge has no e2e check, because its text also shows in the prompt and the status bar.

The CLI now records how each session started: the agent it runs as, the
label its orchestrator gave it and the chat whose message to that agent
started it. An agent's message to another agent starts a chat of the
recipient's own, which used to show nowhere under the recipient.

A top-level chat the listing names an agent for is now filed under that
agent, so it counts, opens and follows its computer as that agent's chat. The
listed agents merge under the sidebar's own assignments and are never written
to projects.yaml. A subagent's row shows its label as a badge, and a row's
tooltip says who started it, including "sent by <chat>".
@edenreich

Copy link
Copy Markdown
Contributor Author

Rooms build on this: the room view nests member chats by the same listing fields. Tracking issue: inference-gateway/cli#1943, desktop steps #741 and #742.

@edenreich
edenreich marked this pull request as ready for review November 23, 2026 16:47
@edenreich
edenreich merged commit ebef993 into main Nov 23, 2026
15 checks passed
@edenreich
edenreich deleted the feat/chat-agent-label-sender branch November 23, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:macos Also build this pull request on macOS in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant