Skip to content

SSH session with iTerm2 auto-writes 'iTerm2 3.6.5Gi-1;invalid payload' in agent panel #3769

Closed

Description

@shariqriazz
video-error.mov

Issue Description

When SSHing into a Linux server using iTerm2 and running opencode, the text 'iTerm2 3.6.5Gi-1;invalid payload' is automatically written in the agent panel where I would normally type my request.

Environment

  • Local: macOS with iTerm2 3.6.5
  • Remote: Linux server (accessed via SSH)
  • opencode version: latest

Steps to Reproduce

  1. SSH into a Linux server from iTerm2
  2. Run opencode
  3. Observe the auto-written text in the agent panel

Expected Behavior

The agent panel should be empty and ready for user input.

Actual Behavior

Text 'iTerm2 3.6.5Gi-1;invalid payload' is automatically inserted.

Video

[Video demonstration will be attached manually]

This appears to be related to iTerm2 shell integration or terminal emulation when running over SSH.

Activity

  1. shariqriazz commented on Nov 2, 2025

    @shariqriazz
    Author

    The error is gone now i ssh'd again and installed shell integration while in server, then restarted the terminal.

  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 2, 2025
  3. thdxr commented on Nov 2, 2025

    @thdxr
    Member

    "installed shell integration" what does this mean?

  4. shariqriazz commented on Nov 2, 2025

    @shariqriazz
    Author

    "installed shell integration" what does this mean?

    Image
  5. przemyslawsokol commented on Nov 5, 2025

    @przemyslawsokol

    I've had similar issues in iTerm2. OpenCode sometimes starts with a text field filled with a Gi=1;invalid payload.

    It seems I don't have Shell Integration installed, since the ~/.iterm2_shell_integration.zsh file is missing (I use Zsh). What's more interesting is that the Main Menu → iTerm2 → Install Shell Integration option is disabled/grayed out. I haven't looked into it deeply, but I saw a suggestion that this iTerm2 issue (inability to install shell integration) might be caused by a conflict with Oh My Zsh (which I also use).

    I can also confirm that the main issue (Gi=1;invalid payload inserted in the text field) occurs only in OpenCode version 1.0.x

  6. jschmdt commented on Nov 12, 2025

    @jschmdt

    @falconepl For me as well, see screenshot below. I'm on macOS Tahoe 26.1 (latest), OpenCode 1.55 & iTerm 3.6.5 – but I have installed the iTerm Shell integration. So the Shell Integration may not be related to this issue. I have not encountered this weird message in Visual Studio Code: neither in zsh nor in bash.

    ❌ Screenshot from iTerm 3.6.5 (Shell Integration installed) » zsh:

    Image

    ✅ Here's a Screenshot from Visual Studio Code » zsh:

    Image

    ✅ Here's a Screenshot from Visual Studio Code » bash:

    Image
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

    opentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions