Skip to content

Team Bus: let an agent add/edit its own session's run commands, not just title/color/status #138

Description

@AThraen

Feature request

Team Bus's self_set MCP tool (see docs/team-bus/spec.md §3, implemented in src/TeamBus.Service/Mcp/SelfTools.cs) already lets an agent control its own shell's display: title, status, color, focus, notify. It should be extended (or a sibling tool added) so an agent can also add/edit its own session's run commands — the same RunCommandItem list a human operator manages today via the sidebar ▶/▼ menu and SessionRunCommandsDialog (see Models/RunCommandItem.cs, Views/SessionRunCommandsDialog.xaml(.cs), and CLAUDE.md's "Per-Session Run Commands" section).

Why

An agent working autonomously in a session often knows the right build/test/lint command for the project it's in (or discovers one over the course of a task) before a human operator has configured it. Letting the agent register that command as a labelled run command — the same object a human would create through the dialog — means:

  • The ▶ button / F5 keybinding becomes useful without the operator having to pre-configure anything.
  • Other teammates (or the operator) can re-run the same command later without re-deriving it.
  • It's consistent with the existing "agent can control its own shell's presentation" precedent self_set already established — this extends that precedent from display to this other per-session configuration surface.

Scope notes (not designed yet — for whoever picks this up)

  • Should stay scoped to the calling agent's own session, exactly like every other self_set-adjacent capability (no way to target another agent's shell).
  • Needs the same schema-conservative design discipline as the rest of the MCP tool surface (spec §3's "keep tool schemas flat, no oneOf/anyOf, assume the least capable MCP client").
  • RunCommandItem has Mode (Process/PowerShell) and PostRunUrl fields — PostRunUrl in particular auto-launches a URL on successful exit with no confirmation (see CLAUDE.md's warning about RunInstance.IsLaunchableUrl), so an agent-supplied value here needs the same validation/trust treatment as the existing human-supplied path, not a looser one just because it's new.
  • Whether this becomes a new tool (self_add_run_command/self_edit_run_command) or an extension of self_set's existing shape needs a real design pass — not decided here, just filing the idea.

Requested by the maintainer during team-bus feature development; not yet scoped into docs/team-bus/plan.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions