Skip to content

task-cron: codex timeout should be 30m and dispatch env should merge process.env #14

@shannon0430

Description

@shannon0430

Summary

runTaskCronCycle task dispatch currently needs two reliability fixes for Codex-heavy setups:

  1. Codex task-cron dispatch timeout should default to 30 minutes (not 10 minutes).
  2. Task-cron dispatch env should merge process.env with optional overrides, so child processes always inherit base environment variables.

Current behavior

In @opengoat/core/dist/core/opengoat/application/opengoat.service.js:

  • TASK_CRON_DISPATCH_TIMEOUT_CODEX_MS can revert to 10 minutes on updates (too short for long-running Codex tasks).
  • const invocationEnv = options.env ?? process.env; can drop base environment variables when options.env is provided.

Expected behavior

  • Codex default timeout should be 30 * 60 * 1000.
  • Dispatch env should be merged:
const invocationEnv = {
  ...process.env,
  ...(options.env ?? {}),
};

Why it matters

  • Prevents false timeout failures for valid long-running task delegations.
  • Avoids missing credentials/config in child process execution when env overrides are used.

Suggested fix

Apply this in source (not dist patching) and ship in the next release so local patching workarounds are no longer needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions