You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Rename dialog loses focus when subagents spawn #14799
When using /rename to rename a session while the agent is actively working, the rename dialog loses focus if subagents spawn. The user has to press Esc and run /rename again to continue typing.
The root cause is a reactive createEffect in packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx that calls input.focus() on the main prompt whenever the visible prop re-evaluates. Since visible depends on session()?.parentID, permissions(), and questions() — all of which can change when subagents spawn via SSE events — the effect fires and steals focus from the rename dialog's textarea.
Steps to reproduce
Start a session and send a prompt that triggers subagent spawning
While the agent is working, type /rename to open the rename dialog
Observe that focus is stolen from the rename dialog when a subagent spawns
The rename input becomes unresponsive until you press Esc and /rename again
Activity
github-actions commentedon Apr 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.