-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Open
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
What do you want to change or add?
I would like to propose a feature that allows two distinct active sessions (projects) within Opencode to communicate and share context with each other.
The Core Concept:
Imagine a scenario where a user has two open projects:
- Project A: A consumer application (e.g., Frontend or a Dependent Service).
- Project B: A dependency provider (e.g., Backend API or Core Library).
Currently, these projects run in isolated silos. I propose adding a "Link Session" or "Dependency Bridge" mechanism. Once linked, the LLM instance in Project A should be able to query or "talk" to the LLM instance/context of Project B.
Proposed Workflow:
- Open Project A and Project B in separate Opencode windows/tabs.
- In Project A, select an option to "Add Context from Active Session: Project B".
- When asking the LLM in Project A to write an integration code (e.g., "Write a function to fetch user data from the API"), the LLM can reference the actual implementation details (routes, DTOs, models) currently existing in Project B’s active session.
What are the benefits of implementing this?
Implementing this feature would significantly enhance developer productivity in multi-repo environments:
- Seamless Integration Development: It eliminates the need to manually copy-paste code snippets (contracts, API schemas) from one project to another just to provide context to the LLM.
- Real-time Synchronization: If a developer modifies an API endpoint in Project B, Project A's LLM immediately "knows" about the change, reducing integration bugs caused by outdated documentation or context.
- Holistic Code Awareness: It mimics a "monorepo" experience for multi-repo setups, allowing the AI to understand the full flow of data from the database (Project B) to the UI (Project A).
- Error Reduction: The LLMs can cross-verify types and method signatures between projects, acting as an intelligent integration linter.
Metadata
Metadata
Assignees
Labels
discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion