Skip to content

[Feature]: Add keybinding to cycle agent trait (mod+.) #2299

Description

@JtMotoX

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

packages/contracts or packages/shared (affects contracts, server, and web)

Problem or use case

OpenCode uses mod+. to cycle through available agents (e.g. Build, Plan). T3 Code supports agent selection via the traits dropdown, but there is no keyboard shortcut to cycle agents without opening the menu. When switching agents frequently during a session, reaching for the mouse each time breaks flow.

Proposed solution

Add an agent.cycle keybinding command bound to mod+. by default (when not in terminal focus). When triggered, it cycles to the next agent in the model's agentOptions list, wrapping from the last back to the first. No-ops when fewer than 2 agents are available.

Why this matters

Users coming from OpenCode expect mod+. to cycle agents. This is a small ergonomic improvement that keeps keyboard-driven workflows smooth when switching between agent modes.

Smallest useful scope

Register agent.cycle as a keybinding command, add a default mod+. binding, and handle it in the existing ChatView keydown handler by advancing the agent option on the current provider's model.

Alternatives considered

Manually selecting the agent from the traits dropdown menu each time. Works but is slower for frequent switching.

Risks or tradeoffs

mod+. may conflict with browser or OS shortcuts on some platforms (e.g. Ctrl+. opens emoji picker on some Linux DEs). The when: "!terminalFocus" guard limits scope. The command is a no-op for providers/models without agent options, so there's no risk of unexpected behavior.

Examples or references

OpenCode uses mod+. for the same purpose. See the OpenCode keybinding defaults.

Contribution

  • I would be open to helping implement this.

Activity

  1. juliusmarminge commented on Apr 23, 2026

    @juliusmarminge
    Member

    agent is an opencode only thing. we need to think more generic

  2. JtMotoX commented on Apr 23, 2026

    @JtMotoX
    Author

    This is an must-have opencode feature. I even have a Ctrl+. button configured on my mouse for this.

    What if, instead of having the built-in keybinding, we just add the agent.cycle command so that users can configure this in their keybindings.json? I can make that change.

  3. juliusmarminge commented on Apr 23, 2026

    @juliusmarminge
    Member

    What i meant wasn't that we shouldn't have the keybinding. We just need to have a more generic way that works across multiple providers with different type of settings such as reasoning effort, fast mode, variants etc etc

  4. locked and limited conversation to collaborators on Aug 15, 2026
  5. converted this issue into a discussion #6735 on Aug 15, 2026
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