Repository navigation
Description
What feature would you like to see?
Bring local clarification to the place where the question arises — without fragmenting the main Agent session.
A long-running coding Agent may produce a multi-page explanation, an execution trace, or a detailed plan. Users frequently want to ask why a particular step was taken or what a specific line means. Today's linear follow-up sends that question to the bottom of the session, breaks reading flow, and risks accidentally influencing the Agent's main task. A separate fork requires leaving the original flow.
I propose Inline Branch Threads for the Kimi Code Web/VS Code conversation UI, with a possible CLI-compatible conversation model later:
- Anchor to a precise selection. Highlight an already-rendered sentence, paragraph, or visible tool-result segment, then click Ask in thread.
- Expand directly at the source. The side conversation appears as a compact, embedded multi-turn thread beside/beneath the selected passage, not as another top-level session. It can be collapsed to a small marker and reopened later.
- Preserve the relationship. Save the selected excerpt, source message, thread messages and provenance. Multiple threads can attach to different parts of a long answer.
- Let the user decide what the main Agent sees.
- Isolated (default): a local, read-only clarification that does not affect the parent Agent's instructions or model context.
- Share summary: inject only a source-labeled conclusion into a later parent turn.
- Share full thread: allow future parent turns to retrieve the full thread, respecting context limits and authorization.
- Agent observation (later): optionally let the thread inspect observed progress, tools and approval state while the parent continues executing, without modifying or interrupting that run.
Illustration:
Main response:
1. Proposed approach ...
2. Test results: 3 checks failed. [Ask in thread]
↳ Why did check B fail?
↳ The validation rejected ...
[Collapse: 2 messages] [Share with main: off/on]
3. Next steps ...
Why this is not a duplicate of #4378
#4378 requests a persistent side conversation complementing /btw, with optional merge/back-to-main. I support that direction. This request is specifically about a selection-anchored, inline and collapsible presentation in the output itself, plus fine-grained, user-controlled context exposure. It should be complementary to any persistent /side infrastructure, not a second competing side-chat backend.
It is also not simply /fork: a fork navigates to a separate session, whereas an inline thread should preserve the parent text, scroll position and multiple local discussions in one view.
Suggested small first slice
Start with selection → inline expand/collapse → multi-turn, persistent isolated thread, and source-message linkage. Add selective parent-context sharing and live execution observation only in subsequent increments. In-flight parent requests must not be retroactively changed.
Questions for the maintainers: Does the Web/VS Code UI roadmap include anchored inline discussions? Can this reuse the existing side-conversation/session abstraction? What would be the smallest acceptable UI scope?
I am interested in producing a minimal prototype and contributing implementation if explicitly invited. I understand the current contribution policy does not accept unsolicited external feature PRs, so this is a design request, not an unsolicited PR.
Additional information
Value beyond UI polish:
- Reading continuity: local follow-ups stay next to the source.
- Agent safety: side questions remain isolated until explicitly shared.
- Explainability & traceability: conclusions retain a provenance link to the original step/output.
- Context efficiency: later parent turns can consume summaries or retrieve the full thread as needed, instead of always flattening all branches.
Activity
Yuanming-Wang commentedon Nov 6, 2026
Update: interactive proof-of-concept completed (2026-11-06)
I have built a standalone browser-based interaction prototype for the proposed Inline Branch Chat concept.
17-second prototype walkthrough video (Google Drive; link-sharing permissions are being configured).
The recording illustrates:
Scope clarification: This is an independent UI/interaction PoC, not a PR against this repository and not evidence that production-grade anchoring, persistence, model-context routing, or live Agent observation is already implemented. Those behaviors would need integration and tests.
I am sharing this to make the UX proposal concrete before attempting implementation.
For Kimi Code, this is a design demonstration only. I am not opening an unsolicited implementation PR. If maintainers find the direction valuable, I would appreciate guidance about any appropriate collaboration channel under the repository's contribution policy.