diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs index d7a1b8f0..fc5ce670 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs @@ -536,6 +536,10 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable var latestRun = await runRepo.GetLatestByTaskIdAsync(row.Id, ct); ct.ThrowIfCancellationRequested(); LatestRunSessionId = latestRun?.SessionId; + // Restore turn/token counts from the last run so a reloaded terminal task + // shows its real turns instead of "0/max". + Turns = latestRun?.TurnCount ?? 0; + Tokens = (latestRun?.TokensIn ?? 0) + (latestRun?.TokensOut ?? 0); Monitor.ApplyOutcome(entity.Result, latestRun?.ErrorMarkdown); Monitor.SetTaskId(row.Id);