fix(spawner): §24 compact check must run when status=done (compact in progress)
This commit is contained in:
@@ -1497,9 +1497,9 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
|
||||
# §24 v3: compact 检测优先用 gateway 日志 rotation 事件
|
||||
# 旧方法 _check_recent_compaction_jsonl 作为 fallback
|
||||
# 只在 agent 非空闲时才检查(减少不必要 I/O)
|
||||
if result["status"] not in (
|
||||
"done", "idle", "unknown", None):
|
||||
# 重要:compact 进行中时 status=done,所以不能按 status 过滤
|
||||
# 只跳过 idle/unknown(完全没有活动过的 session)
|
||||
if result["status"] not in ("idle", "unknown", None):
|
||||
session_key = f"agent:{agent_id}:main"
|
||||
result["recent_compact"] = AgentSpawner._check_compact_in_progress_gateway(
|
||||
session_key)
|
||||
|
||||
Reference in New Issue
Block a user