Skip to content

[Bug]: Pty result injection drops session into Plan mode #22

Closed

Description

@JosXa

I don't know if this is an OpenCode-related issue or something with oc-pty, but whenever the <pty_exited> gets injected into my session, it changes my main agent from whatever it was (yellow) to plan mode (purple):

Image

Has anyone seen this before?

OpenCode 1.2.5
opencode-pty 0.1.5

Activity

  1. shekohex commented on Feb 16, 2026

    @shekohex
    Owner

    This how we are currently sending this message:

    await this.client.session.promptAsync({
    path: { id: session.parentSessionId },
    body: {
    parts: [{ type: 'text', text: message }],
    },
    })
    } catch {
    // Ignore notification errors
    }

    no change of the agent or anything else, do you see the agent change at your status bar?

    I guess I noticed that recently, but it only changed the variant. Could be a bug in opencode, since it never did that before.

  2. JosXa commented on Feb 16, 2026

    @JosXa
    ContributorAuthor

    Gotcha, yeah, I just had it happen for a different tool call aswell. Probably something in opencode. Thanks for checking :)

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions