backgroundLauncherFor returns the harness's BackgroundLauncher capability, or a clean error if the harness can't host background sessions. This is the capability gate for $FLOW_TERM=bg: flow never silently falls back to a terminal tab when the pinned harness lacks the capability.
(h harness.Harness)
| 536 | if _, err := db.Exec( |
| 537 | `UPDATE workdirs SET last_used_at = ? WHERE path = ?`, |
| 538 | now2, task.WorkDir, |
| 539 | ); err != nil { |
| 540 | fmt.Fprintf(os.Stderr, "warning: bump workdir last_used_at: %v\n", err) |
| 541 | } |
| 542 | |
| 543 | if needsBootstrap { |
| 544 | fmt.Printf("Spawned %s (session %s)\n", task.Slug, sessionID) |
| 545 | } else { |
| 546 | fmt.Printf("Resumed %s (session %s)\n", task.Slug, sessionID) |
| 547 | } |
| 548 | return 0 |
| 549 | } |