Skip to content

mecatui: /agent command and picker for session-scoped agent definitions - #2055

Open
kantord wants to merge 2 commits into
impl/session-scoped-agent-identityfrom
impl/session-scoped-agent-identity-mecatui
Open

kantord wants to merge 2 commits into
impl/session-scoped-agent-identityfrom
impl/session-scoped-agent-identity-mecatui

Conversation

@kantord

@kantord kantord commented Oct 1, 2026

Copy link
Copy Markdown
Member

Stage: Implementation (stacked on #2003)

Adds the mecatui side of ADR 0353 so session-scoped agent identity can be tried end to end from the TUI. Stacked on #2003 (base branch impl/session-scoped-agent-identity): review that backend PR first; this diff is only cmd/mecatui/ (15 files, +653/-4).

What this does

  • /agent <name> starts a new session bound to the named agent definition (CreateSessionRequest.agent_definition_name). An unknown name fails loudly and recoverably.
  • Bare /agent (typed or from the / palette) opens a filterable picker listing definitions by name; Enter starts a session bound to the highlighted one. /agents still shows full details.
  • Both send the operator's active model selection like every other create path. Without it a definition with no model: fell to the server default model.
  • Submitting /agent closes the slash-command palette.

Verification

  • go test ./cmd/mecatui/... and task lint pass. New tests cover parsing, active-selection carry-through (mutation-checked), the picker filter/select/error/stale-result paths, and palette closing (mutation-checked).
  • Tried by hand against a local mecated: /agent <name> and the picker create bound sessions.

Known limitations and open questions

  • The operator's active model selection overrides a definition's own model: (ADR 0353 case 4: an explicit provider+model pair wins). Whether a definition's pin should win instead is undecided.
  • A server older than ADR 0353 that advertises agent definitions would silently ignore agent_definition_name; there is no capability flag for this.
  • The picker has no mouse click targets; keyboard and wheel only.
  • Scheduled tasks cannot bind to an agent definition (no field on ScheduleSpec); not part of this PR.

Fully or partially written by an AI agent.

🤖 Generated with Claude Code

kantord and others added 2 commits October 1, 2026 17:39
… definition

Re-applies the mecatui /agent command on top of the backend PR (stacked).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ions

Re-applies the mecatui bare /agent picker on top of the backend PR (stacked).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant