Problem
ContainerRunner.run() logs "Starting container" then goes silent until the container exits — up to 2 hours later. A stuck or slow container is completely invisible during that window. Workers appear hung with no signal of progress.
Proposed solution
In ContainerRunner.run() (src/forge/sandbox/runner.py), start a background asyncio task immediately after the subprocess is spawned. Every 60 seconds, log:
Container {container_name} still running ({elapsed}s elapsed, {remaining}s remaining of {timeout}s timeout)
Cancel the heartbeat task once process.communicate() returns. Use logger.info so it appears in normal worker output without being noisy.
Reference
Learned from fullsend: internal/cli/run.go:runHeartbeat() — emits every 30s, shows elapsed + remaining against timeout.
Problem
ContainerRunner.run()logs "Starting container" then goes silent until the container exits — up to 2 hours later. A stuck or slow container is completely invisible during that window. Workers appear hung with no signal of progress.Proposed solution
In
ContainerRunner.run()(src/forge/sandbox/runner.py), start a backgroundasynciotask immediately after the subprocess is spawned. Every 60 seconds, log:Cancel the heartbeat task once
process.communicate()returns. Uselogger.infoso it appears in normal worker output without being noisy.Reference
Learned from fullsend:
internal/cli/run.go:runHeartbeat()— emits every 30s, shows elapsed + remaining against timeout.