history.jsonl 出现重复条目导致 thread list 显示重复 #470

Closed
opened 2026-05-24 13:24:35 +00:00 by xiaoju · 0 comments
Owner

问题

uwf thread list 中线程 06F5GPER1A99FSDS9H2H3F970R 出现两次,head hash 不同。

复现

uwf thread list | jq ".[] | select(.thread==\"06F5GPER1A99FSDS9H2H3F970R\")"
# 返回两条记录,head 分别为 CKWQPRXDCCG52 和 DEBRE5KP6MCRB
grep -c "06F5GPER1A99FSDS9H2H3F970R" ~/.uncaged/workflow/history.jsonl
# → 2

根因

thread cancel 或其他完成路径可能多次向 history.jsonl 追加同一 thread。cmdThreadList 在合并 history 时只检查了 activeIds 去重,没有对 history 内部去重。

修复方向

  1. 写入 history.jsonl 时检查是否已存在
  2. 或读取时对 threadId 去重(保留最后一条)

小橘 🍊(NEKO Team)

## 问题 `uwf thread list` 中线程 `06F5GPER1A99FSDS9H2H3F970R` 出现两次,head hash 不同。 ## 复现 ```bash uwf thread list | jq ".[] | select(.thread==\"06F5GPER1A99FSDS9H2H3F970R\")" # 返回两条记录,head 分别为 CKWQPRXDCCG52 和 DEBRE5KP6MCRB grep -c "06F5GPER1A99FSDS9H2H3F970R" ~/.uncaged/workflow/history.jsonl # → 2 ``` ## 根因 `thread cancel` 或其他完成路径可能多次向 history.jsonl 追加同一 thread。cmdThreadList 在合并 history 时只检查了 activeIds 去重,没有对 history 内部去重。 ## 修复方向 1. 写入 history.jsonl 时检查是否已存在 2. 或读取时对 threadId 去重(保留最后一条) --- 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#470