Skip to content

SSE events not emitted when using opencode attach --dir #11522

Closed

Description

@tcrapts

Description

When using opencode attach with the --dir flag to connect to a remote server, the server does not emit session.status SSE events when messages are sent/received. Without the --dir flag, events are emitted correctly.

Plugins

No response

OpenCode version

1.1.48

Steps to reproduce

  1. Start OpenCode server: opencode serve --port 4096
  2. In another terminal, listen to SSE events: curl -N "http://localhost:4096/event"
  3. Attach WITH --dir: opencode attach http://localhost:4096 --session <session_id> --dir /path/to/project
  4. Send a message in the attached terminal
  5. Expected: SSE stream shows session.status events (busy → idle)
  6. Actual: only heartbeat events are received, no session.status events

Workaround:
Attach WITHOUT the --dir flag - events are emitted correctly:
opencode attach http://localhost:4096 --session <session_id>

Screenshot and/or share link

No response

Operating System

Ubuntu (WSL2)

Terminal

zsh

Activity

  1. github-actions commented on Jan 31, 2026

    @github-actions
    Contributor

    This issue appears to be related to other opencode attach --dir problems with remote servers. Please check these related issues to ensure they're not duplicates or related:

    The root cause might be shared across these issues, so it could be helpful to review them together.

  2. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions