Skip to content

Agent-pushed status chips in the sidebar row via OSC 9001 (token.<name>=…, with TTL) #172

Open

Description

@AThraen

This was generated by AI during triage.

Summary

Let the program in a session push small status chips into its sidebar row (and the toolbar), e.g. tests 12/40, PR #82, deploying. Each chip has an optional time-to-live, so a stale one disappears on its own.

Motivation

OSC 9001 already lets a session set its title, colour, branch and dirty flag. Agents and hooks often have one more fact worth showing at a glance — progress, the current task, the PR number — and today the only option is to stuff it into the title.

Herdr (pane report-metadata, v0.9.0–v0.9.1):

  • --token key=value sets display-only tokens, with --ttl-ms for expiry;
  • --state-label state=text renames a state's label;
  • sidebar rules can recolour, bold, dim or hide tokens based on their value.

Tokens are visual only. Waits, notifications and roll-ups still use the semantic state.

Proposal

  • Wire format. New OSC 9001 keys: token.<name>=<value> (an empty value removes the chip) and token-ttl=<seconds>, which applies to the tokens in the same sequence.
  • Validation in ShellIntegrationPayload:
    • token names [a-z0-9-]{1,16};
    • values stripped of control characters and capped (~24 chars);
    • at most 4 tokens per session;
    • TTL capped (e.g. 24h).
  • Display. Chips render after the branch in the sidebar row and in the terminal toolbar, in a muted pill style using Catppuccin colours.
  • Lifetime. Chips live in memory only and are not persisted. A restart clears them, which is what you want for "deploying".
  • No colour rules in v1. If a chip needs emphasis, the agent can push the accent via color=.

Related: #161 (kanban cards can show the chips), #138 (Team Bus), docs/shell-integration.md.

Activity

  1. AThraen commented on Nov 10, 2026

    @AThraen
    ContributorAuthor

    This was generated by AI during triage.

    Overlap with #190 to settle first. OSC 7501 records already carry an id path, progress, a base64 msg and a title. CSM shows the combined state and puts the message in the status tooltip. Two ways forward:

    1. Render 7501 child records as chips. For example, build/test working 40% becomes a chip that disappears on clear, on exit or at the next prompt. Programs then need no new protocol, and the lifetime rules already exist.
    2. Keep the OSC 9001 token.<name>=… proposal for values that aren't a state at all (a URL, a port, a ticket number). 7501 has no place for those.

    These two are complementary. I'd do (1) first, since it is mostly UI on data we already parse.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions