Skip to content

feat: terminal tab/window title with session name and thinking indicator - #5318

Closed
iRonin wants to merge 2 commits into
NousResearch:mainfrom
iRonin:feat/terminal-title-v2
Closed

feat: terminal tab/window title with session name and thinking indicator#5318
iRonin wants to merge 2 commits into
NousResearch:mainfrom
iRonin:feat/terminal-title-v2

Conversation

@iRonin

@iRonin iRonin commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Sets the terminal window/tab title when Hermes starts and updates it as the session progresses.

Tab title format

State Title
Idle (no title)
Idle (with session title) ⚕ My Session
Agent thinking ⚕ My Session ⏳
  • Symbol comes from the active skin's response_label branding (⚕ default, ⚔ Ares, etc.)
  • Session title also shown in the response panel header: ╭─ ⚕ Hermes — My Session ─╮

Configuration

display:
  terminal_title: false  # opt-out

iRonin added 2 commits April 11, 2026 16:31
…dicator

Sets the terminal title via OSC 0 escape sequence (\x1b]0;...\x07):

  ⚕ Hermes — session name   (named session, idle)
  ⚕ Hermes ⏳                (agent thinking)
  ⚕ Hermes                   (unnamed session)

Symbol comes from the active skin's response_label (⚕ default,
⚔ Ares, etc.) so it adapts to the current theme.

Updated at:
- run() startup
- _preload_resumed_session() when a titled session is resumed
- /title command when a title is set or committed from pending
- process_loop when agent starts (thinking=True) and finishes

Skipped when stdout is not a TTY, TERM=dumb, or NO_COLOR is set.
Users on tmux/screen, or whose iTerm2 profile appends the job name
(Python) to the tab title, can now disable OSC title sequences:

  display:
    terminal_title: false

Default: true (enabled).

@teknium1 teknium1 left a comment

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.

Thanks for the terminal-title contribution. The underlying request remains relevant for the classic CLI: current main still defaults to the prompt_toolkit interface (hermes_cli/config.py:1771-1776), while the equivalent title behavior is currently implemented only in the opt-in TUI (ui-tui/src/app/useMainApp.ts:576-586, commit d33965396).

Problems

  • cli.py:6057 changes _on_tool_progress to three parameters, but the registered callback is invoked with four lifecycle arguments by agent/tool_executor.py:511. The PR body also still reads event_type at cli.py:6068, which is no longer a parameter. This breaks tool-progress handling.
  • The PR's cli.py diff includes 276 unrelated deletions/reversions, so it is not a safe feature-only salvage onto current main.

Suggested changes

  • Reimplement the classic-CLI title feature narrowly on current main, preserving the existing tool-progress callback contract.
  • Add focused lifecycle and opt-out tests for the title helper.

Automated hermes-sweeper review.

Comment thread cli.py

def _on_tool_progress(self, event_type: str, function_name: str = None, preview: str = None, function_args: dict = None, **kwargs):
"""Called on tool lifecycle events (tool.started, tool.completed, reasoning.available, etc.).
def _on_tool_progress(self, function_name: str, preview: str, function_args: dict):

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.

_on_tool_progress remains registered as the agent lifecycle callback, whose executor calls it as (event_type, function_name, preview, function_args). This three-argument signature therefore raises TypeError for every tool event; the body also still references the now-undefined event_type below. Preserve the existing callback contract.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
@teknium1 teknium1 added the area/sessions Session lifecycle, resume, persistence, history label Jul 19, 2026
@OutThisLife

Copy link
Copy Markdown
Collaborator

Superseded by #74654 (classic CLI) and #74683 (TUI). #74654 is the current-main atomic CLI implementation with the OSC 1/2 lifecycle, config gate, and session title — the same feature this PR proposed. Closing to consolidate; thank you for the work.

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

Labels

area/sessions Session lifecycle, resume, persistence, history comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants