Skip to content

[Feature] Reference another session with @ #3227

Closed

Description

@veracioux

I think it would be useful to be able to reference a different session using the @ symbol, so that the session's content would be available in the LLM's context.

Some ideas on how this could be implemented:

  1. When creating a session title, also generate a slug using the AI. When typing @<that_slug> the LLM would have that session available in its context.
  2. Generate a friendly but short slug (random or based on the session ID) - something like docker does for containers: vibrant_cray, competent_elgamal, etc. When typing @<that_slug> the LLM would have that session available in its context.
  3. Use the session title after @, e.g. typing @Creat would show a completion window that would list Creating Dockerfile for opencode CLI which you can select. That session would then be available in the LLM's context.

One use case for this that just came up, though I could probably come up with numerous others:

I created a Dockerfile in the OC repo in the packages/opencode directory, but later realized that it would be better to have it in the repo root. I would like to cd to the repo root with the LLM retaining the context, but can't and have to start from scratch or use workarounds.

I volunteer to implement this.

Activity

  1. github-actions commented on Oct 16, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 16, 2025

    @rekram1-node
    Contributor

    was your problem wanting to reference a different session? Or was it just the need to reference files outside cwd

  3. veracioux commented on Oct 16, 2025

    @veracioux
    ContributorAuthor

    @rekram1-node Both would be nice, but this feature request is about referencing another session. The example was just one use case for the feature (the one that sparked the idea), though probably not the best one. Actually, this feature would address the existing issues the github bot linked, and those issues highlight better use cases than mine.

  4. rekram1-node commented on Oct 16, 2025

    @rekram1-node
    Contributor

    yeah not sure how we wanna approach this currently, I think rn the best thing for you would be writing a custom tool that lets the llm search previous sessions if it wants. Later on we will probably have some memory type of thing potentially

    i dont think doing an @ reference will be best mechanism here

  5. iamhenry commented on Nov 11, 2025

    @iamhenry

    would a plugin be able to search the local db to accomplish this?

  6. rekram1-node commented on Nov 12, 2025

    @rekram1-node
    Contributor

    I think you'd be better off wrapping the sdk and making custom tools to search through sessions (which qualify as plugins) but yeah to some degree u could, tho we dont have a plugin for some parts that u may want like @ completions plugins

  7. rohitpaulk commented on Sep 28, 2026

    @rohitpaulk

    Was this implemented? Searched docs but didn't find an easy way to reference another session

  8. robin-brochier-mirakl commented on Oct 2, 2026

    @robin-brochier-mirakl
  9. robin-brochier-mirakl commented on Oct 2, 2026

    @robin-brochier-mirakl

    You might export to markdown/json and import in the current session. But that's not really user friendly :-(

  10. bharatvansh commented on Oct 4, 2026

    @bharatvansh

    Really need this one, Very imp.

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

Metadata

Metadata

Assignees

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