mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Fix parallel worker chat log orphans
Skip persisted tool-result files for BACKGROUND contexts, remove ephemeral direct parallel worker chat folders during cleanup, and ignore chat directories without chat.json during startup loading. Add focused regressions for background output persistence, parallel worker cleanup, and orphan directory loading.
This commit is contained in:
parent
77552b9394
commit
78a50e1431
9 changed files with 84 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
- Preserve tool result traceability without leaking secrets.
|
||||
- Keep file artifacts inside expected runtime/user-owned paths.
|
||||
- Skip BACKGROUND contexts; background workers must remain ephemeral and must not create chat message files.
|
||||
|
||||
## Work Guidance
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from typing import Any
|
||||
from agent import AgentContextType
|
||||
from helpers.extension import Extension
|
||||
from helpers import files, persist_chat
|
||||
import os, re
|
||||
|
|
@ -9,6 +10,9 @@ class SaveToolCallFile(Extension):
|
|||
def execute(self, data: dict[str, Any] | None = None, **kwargs):
|
||||
if not self.agent:
|
||||
return
|
||||
|
||||
if self.agent.context.type == AgentContextType.BACKGROUND:
|
||||
return
|
||||
|
||||
if not data:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue