anomalyco / anomalyco/opencode

[FEATURE]: Add "Session Changes" View

Open
#42,926 0 comments 1 reaction 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 16, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

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

Feature Request: Add "Session Changes" View

I would like to request a new changes view in OpenCode called "Session Changes".

Currently, OpenCode provides different ways to inspect changes, such as:

  • Git Changes — changes compared to the Git working tree / repository state.

  • Last Turn Changes — changes introduced by the latest message/action.

I would like to add a third option:

Session Changes

Session Changes should show the complete set of file changes that happened during the current OpenCode session.

Expected Behavior

When a user starts a new session:

  1. Capture the relevant file state at the beginning of the session.

  2. As the session progresses, track all file modifications, creations, deletions, and renames made during that session.

  3. When the user opens Session Changes, display the cumulative diff between:

    • the file state at the beginning of the session

    • and the current file state


right here: Image

For example:

Session starts
    ↓
User sends Message 1
    ↓
Files are modified
    ↓
User sends Message 2
    ↓
More files are modified
    ↓
User sends Message 3
    ↓
More changes
    ↓
Session Changes
    ↓
Show ALL cumulative changes from the beginning of the session
Important Distinction

The three views should have clearly different purposes:

View | Comparison -- | -- Git Changes | Current state vs Git baseline Last Turn

Changes | Changes introduced by the latest message/action
Session Changes | Beginning of current session vs current state

The Session Changes view should NOT simply be another way of displaying Git Changes.

For example, assume a file already had uncommitted changes before the OpenCode session started:

Before OpenCode session:
file.php
    Existing user changes

Then OpenCode modifies the same file during the session:

During OpenCode session:
file.php
    Existing user changes
    +
    OpenCode changes

In this case, Session Changes should only show the changes introduced during the current session, rather than including the pre-existing changes.

Required Features

The Session Changes view should support:

  • Modified files

  • Newly created files

  • Deleted files

  • Renamed/moved files

  • Full unified diff

  • File-by-file diff navigation

  • Added/removed line counts

  • Current cumulative state

  • Automatic updates as the session progresses

Session Lifecycle

The baseline should be created when the session starts.

For example:

Session Start
    ↓
Create Session Baseline
    ↓
Message 1 → changes
    ↓
Message 2 → changes
    ↓
Message 3 → changes
    ↓
Message N → changes
    ↓
Current Session Changes

The baseline should remain unchanged throughout the session.

Persistence

If technically feasible, the session baseline should be persisted with the session so that reopening/resuming a session does not lose the ability to calculate Session Changes.

If a session is resumed later, OpenCode should still be able to determine:

Session Baseline → Current State

and display the cumulative changes.

UI

Please add Session Changes as a separate option alongside the existing change views.

For example:

Changes

├── Git Changes
├── Last Turn Changes
└── Session Changes

The UI should make it immediately clear that these are three different comparison scopes.

Performance Considerations

The implementation should avoid unnecessarily copying the entire project or creating expensive snapshots for large repositories.

Please use the most efficient approach available within OpenCode's existing architecture.

The implementation should also correctly handle:

  • Large repositories

  • Large files

  • Binary files

  • Files outside Git tracking

  • Git repositories

  • Non-Git projects

Non-Git Projects

Session Changes should ideally work even when the project is not a Git repository.

The feature should be based on the OpenCode session baseline rather than depending entirely on Git.

Goal

The main goal is to answer this question:

"What exactly has changed in my project because of everything that happened during this OpenCode session?"

This should include the cumulative changes from the first message of the current session up to the current moment, independent of Git history and independent of only the latest message.

Please implement this feature following OpenCode's existing architecture, UI patterns, state management conventions, and coding standards. Avoid duplicating existing diff/change-tracking logic where it can be reused.



I speak Persian and my English is not very good. If there is anything you don't understand, I would appreciate it if you could tell me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.