fix(dreamer): honor Pi Dreamer per-task timeout_minutes

Merged
MV
6d ago
+108-5

Pi Dreamer tasks configured with a timeout longer than 30 minutes still terminate after 30 minutes, even when the task is actively producing events. The Pi subprocess runner imposed a hardcoded 30-minute timeout that could expire before the executor’s per-task timeout and abort signal.

The runner now receives the task’s configured timeout in milliseconds, defaulting to 30 minutes when unspecified. A regression test verifies that a 120-minute task forwards the expected timeout while leaving fallback model handling with the shared executor.

Ran npm test locally on macOS for the magic-context createPiDreamerClient change; it hit its time limit before finishing.
Tests for the magic-context createPiDreamerClient change live in packages/pi-plugin/src/dreamer/index.test.ts.
The tests in packages/pi-plugin/src/dreamer/index.test.ts fail without the fix in the magic-context createPiDreamerClient change (checked by reverting the source changes).

Harness coverage (required)

For each entry select: covered / not applicable — surface does not exist there / NOT covered.

  • OpenCode 1:
  • OpenCode 2:
  • Pi:
  • OMP:
  • Rust module:

Issue 784.


Summary by cubic

Fixes Issue 784: Pi Dreamer tasks configured with a timeout longer than 30 minutes were cut off at 30 minutes because the subprocess runner imposed a hardcoded wall-clock limit. The runner now uses the task's configured timeout_minutes (defaulting to 30 minutes when unset) plus 5 minutes of headroom, so the executor's abort signal always ends the run first.

Also maps the Pi user-memory review child title to its configured task (review-user-memories) so the child gets that task's timeout and records under the expected name. Regression tests confirm a 120-minute task forwards its timeout plus headroom, an unconfigured task uses the default, and fallback model handling stays with the shared executor.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no blocking findings.

Summary

Pi Dreamer now gives each child process its task’s configured timeout plus five minutes of headroom.

  • Pi Dreamer runner deadlines follow each task's timeout.
  • Pi user-memory child sessions use the configured task name.

No code changed since the previous review. No previous findings were supplied, and no new rule violations were found. Tests were not run during this review.

Reviews (4) · Last reviewed commit: "fix(dreamer): honor Pi Dreamer per-task ..." · Reviewed by Greptile