Commit d9afbce
fix: 收到 result 后立即跳出消息循环,避免 idle timeout 误报 (#258)
* fix: 收到 result 后立即跳出消息循环,避免 idle timeout 误报
问题:SDK 返回 result 消息后,如果有 background task 仍在运行,
for-await 循环不会结束,导致 idle timer 继续倒计时最终触发超时。
实际查询已经成功完成,不应该报超时。
修复:用 labeled break 在收到 result 后立即跳出循环,
并调用 q.close() 确保子进程不泄漏。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: settingSources 加入 'local' 以加载 settings.local.json 权限白名单
问题:urhox-bench 的 .claude/settings.local.json 包含完整的 bash 命令
白名单(git/npm/npx/gh 等),但 SDK 只传了 ['user', 'project'],
'local' 未包含,导致这些权限不生效。SDK 弹窗请求授权时飞书 bot
无法交互,报 "Stream closed"。
修复:settingSources 加入 'local',优先级:user < project < local。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7107288 commit d9afbce
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
| 950 | + | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
| |||
984 | 985 | | |
985 | 986 | | |
986 | 987 | | |
987 | | - | |
| 988 | + | |
| 989 | + | |
988 | 990 | | |
989 | 991 | | |
990 | 992 | | |
| |||
1123 | 1125 | | |
1124 | 1126 | | |
1125 | 1127 | | |
1126 | | - | |
| 1128 | + | |
1127 | 1129 | | |
1128 | 1130 | | |
1129 | 1131 | | |
| |||
1132 | 1134 | | |
1133 | 1135 | | |
1134 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1135 | 1141 | | |
1136 | 1142 | | |
1137 | 1143 | | |
| |||
0 commit comments