Skip to content

Add opt-in background tab title updates#32

Closed
carlosorch wants to merge 1 commit into
ygncode:mainfrom
carlosorch:background-set-tab-title
Closed

Add opt-in background tab title updates#32
carlosorch wants to merge 1 commit into
ygncode:mainfrom
carlosorch:background-set-tab-title

Conversation

@carlosorch
Copy link
Copy Markdown

Add opt-in background tab title updates

Summary

This adds an opt-in background mode for pi_web_set_tab_title.

Nothing changes by default. The tool still updates the title synchronously and returns the same response shape as before. If PI_WEB_BACKGROUND_TAB_TITLE=1 is set, the tool queues the title update
and returns immediately.

Why

Title updates are cosmetic, so users may not want them to block the current agent turn.

Behavior

Default:

details: { title }

With PI_WEB_BACKGROUND_TAB_TITLE=1:

details: { queued: true, title }

Queued updates check that the session has not changed before applying the title, and pending updates are cancelled on session shutdown/reload.

Adds an opt-in PI_WEB_BACKGROUND_TAB_TITLE mode for pi_web_set_tab_title.

By default, the tool keeps the existing synchronous behavior. When PI_WEB_BACKGROUND_TAB_TITLE is set to 1, true, or yes, title updates are queued in the background and the tool returns immediately. Queued updates are guarded against stale sessions and cancelled on session shutdown/reload.

This avoids blocking the agent turn on cosmetic terminal/session title updates while preserving backwards-compatible default behavior.
@carlosorch carlosorch force-pushed the background-set-tab-title branch 3 times, most recently from ffd4c32 to c3ff3f2 Compare June 2, 2026 20:58
@setkyar
Copy link
Copy Markdown
Contributor

setkyar commented Jun 3, 2026

I will close this PR as I am working on it and plan to setup via the setting page.

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.

2 participants