Skip to content

[FEATURE]: Open session button when a reply references another session #56419

Open

Description

@RaphaelFakhri

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Related but different: #47265 (clickable background subagent entries), #53933 (reference another session's context), #36193 (TUI session overview and pinned shortcuts). None of them covers jumping to a session that the agent names in its reply.

Describe the enhancement you want to request

When the agent's reply refers to another session, render that reference as a button or link that opens the session in one click.

What happened

In the web UI (OpenCode v2.0.26, opencode2 serve), I asked the agent where a background job's sessions run, because I couldn't find them. The exchange went like this:

  1. I asked where the job runs, since I didn't see it in OpenCode v2.
  2. The agent replied that there are two sessions, "Goal: badges" and "Goal: daily PRs", under a specific project folder, and that they were created a few minutes earlier, so I should refresh the session list.
  3. I replied with a screenshot: "but I couldn't see it right here."
  4. The agent answered that both sessions exist under that folder, that it couldn't tell why I didn't see them, and that it had woken one of them so it would move to the top of the list. It then asked me which folder or screen I was looking at.

The agent knew the exact session IDs the whole time. I still had to switch projects, scroll, and search by title, and I gave up before finding them. Four messages went to locating two sessions that the agent could have handed me directly.

What I'd like

  • When an assistant message contains a session ID, or a tool result returns one, show an Open session button next to it.
  • The button opens the session even when it belongs to a different project or directory, without requiring you to switch projects first.
  • Optionally, give the agent a way to emit a session reference on purpose (for example, a session://<id> link that renders as a chip with the session title).

Why it helps

  • Agents that spawn or manage other sessions (background jobs, subagents, scheduled work) already know the IDs, so the UI only needs to make them clickable.
  • It removes a whole class of "where is it?" back-and-forth, especially on mobile, where browsing the session list across projects is slow.
  • It also covers the case in app: make background subagent entries in Session details clickable #47265, since a subagent entry is one more place a session ID appears.

Activity

  1. opencode-agent commented on Oct 17, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up! You're asking for sessions that the agent mentions in a reply to open in one click, even when they belong to another project.

    Most of this is already in v2.0.26, the version you're on. When an assistant message contains a full session ID (ses_ followed by 26 characters), as plain text or inline code, the web UI shows it as a button. Clicking it opens the session in a tab, and you don't need to switch projects first. In your conversation, the agent seems to have named the sessions only by title ("Goal: badges", "Goal: daily PRs"), so there was nothing to link.

    Until the agent does this on its own, you can add a line like this to your AGENTS.md:

    When you mention another session, always include its full session ID (e.g. `ses_…`) so it renders as a clickable link.

    These parts aren't covered yet, and the maintainers will consider them:

    • linking session IDs that appear in tool results, not only in the agent's reply text
    • showing the session title as a chip instead of the raw ID
    • getting the agent to include session IDs without being told to

    Related issues and PRs:

  2. RaphaelFakhri commented on Oct 17, 2026

    @RaphaelFakhri
    Author

    Another case from today, on OpenCode v2.0.26 web UI (opencode2 serve). This time the agent included the full session ID, and getting to the session still failed.

    What happened

    1. I asked the agent to find the session where an earlier piece of work happened and let me open it.

    2. The agent found it by title and ID (ses_ec68cb100ffe72VF07rXJmir1P). Because it had no supported way to produce a link, it guessed a URL from the directory: https://<server>/L2hvbWUvb3BjL2NrLWVtYWls/session/ses_ec68cb100ffe72VF07rXJmir1P.

    3. Opening that URL crashes the app:

      Error: Unrecognised route!
          at Jo (https://<server>/_assets/runtime-BfldUWqN.js:7:9736)
          at Object.fn (https://<server>/_assets/runtime-BfldUWqN.js:7:9798)
          at ge (https://<server>/_assets/store-CWFQZoRe.js:1:5853)
          ...
      
    4. The agent then guessed a second format, /server/<base64 server URL>/session/<id>, and told me it couldn't confirm that one works either. Its fallback advice was to find the session by title in the session list, which is the manual search this issue asks to remove.

    Three messages went to producing a link to a session the agent had already identified by ID.

    What this adds to the request

    • The ID-to-button rendering mentioned in the earlier reply isn't enough when the user asks for a link: the agent tries to build a URL, and the route format isn't documented anywhere it can see.
    • Give agents a supported way to reference a session, such as a session://<id> link or a tool that returns a canonical, openable URL, so they don't guess route formats.
    • Render any URL that contains a known session ID as an Open session button, and resolve it to the correct route for the current server.
    • When a session route can't be matched, show a "session not found" page with a link to the session list, not an unhandled Unrecognised route! error.
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions