t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Diffs view seem to show edits/diffs from a different agent/app/editor within the session

Open cosmiclasagnadev opened this issue 8 months ago • 4 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Wasn't actually sure if this was a bug or feature request but:

  1. Open any workspace/project with the desktop app and another app for agentic coding (in this example, I used opencode)
  2. Prompt opencode to implement feature A and then prompt t3code to implement/plan feature B
  3. You'll notice that the modified files and lines in opencode will show up in t3code's current session/turn as well

Expected behavior

If I want to do a quick bugfix/feature prototype and I don't have worktrees setup -- it would be nice to only have to prompt a quick thing, verify/review the code, commit/push, and create a PR without having to sift through changes from another coding agent. All items in the diffs/changes view should only show actual changes made by the t3code app.

Actual behavior

Currently, it will display all changes made by all agents in the current turn

Impact

Cosmetic issue

Version or commit

0.0.14 (28afb14004bb)

Environment

macOS 26.2, Desktop app 0.0.14, Bun 1.3.11, Codex gpt-5.4

Logs or stack traces


Screenshots, recordings, or supporting files

Screenshot 2026-03-28 at 5.13.07 AM.png

Workaround

No response

cosmiclasagnadev avatar Mar 27 '26 21:03 cosmiclasagnadev

I can confirm the same happens to me. is seem like the diff is taken from the who project and not just the worked files.

benakdev avatar Mar 27 '26 21:03 benakdev

The diff system works by taking git snapshots of the project at each message turn. When you view a diff, it compares the snapshot from one turn to the next.

Since you're not using worktrees, all agents share the same working directory. So if opencode makes changes between two t3code turns, those changes get picked up in the next snapshot and appear as diffs in t3code's session.

Using worktrees would prevent this, as each thread gets its own isolated copy of the repo.

See also #1743 for the same issue with Codex.

GuilhermeVieiraDev avatar Apr 06 '26 17:04 GuilhermeVieiraDev

This has increasingly felt more like a UX preference thing and tbh using worktrees seems like a valid fix anyway. Issue was opened initially because other agents are able to scope out changes done per session by default unlike t3code, but if using worktrees is the intended path for my specific case then I'm closing this for now.

cosmiclasagnadev avatar Apr 06 '26 20:04 cosmiclasagnadev

@cosmiclasagnadev if you want an official take from Julius check out his response on #1743

GuilhermeVieiraDev avatar Apr 06 '26 20:04 GuilhermeVieiraDev