Fix running background status in s_full

Keep the reference agent's background status output readable by reporting '(running)' instead of leaking a None placeholder for unfinished tasks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Gujiassh
2026-03-12 15:45:20 +09:00
parent 450185b952
commit 49ab1e6ff8
2 changed files with 68 additions and 1 deletions

View File

@@ -350,7 +350,7 @@ class BackgroundManager:
def check(self, tid: str = None) -> str:
if tid:
t = self.tasks.get(tid)
return f"[{t['status']}] {t.get('result', '(running)')}" if t else f"Unknown: {tid}"
return f"[{t['status']}] {t.get('result') or '(running)'}" if t else f"Unknown: {tid}"
return "\n".join(f"{k}: [{v['status']}] {v['command'][:60]}" for k, v in self.tasks.items()) or "No bg tasks."
def drain(self) -> list: