Skip to content

feat(async-tasks): increase default subagent timeout from 10 to 30 minutes #198

@randomm

Description

@randomm

Task Description

Increase the default subagent/task execution timeout from 10 minutes to 30 minutes in both independent timeout locations.

Background

Research revealed two independent hardcoded timeout constants (not shared):

  1. packages/opencode/src/session/async-tasks.ts line 52: DEFAULT_TASK_TIMEOUT = 10 * 60 * 1000 — controls background/async task execution
  2. packages/opencode/src/tool/task.ts line 381: taskTimeoutMs = 10 * 60 * 1000 — controls sync task tool execution

The current 10-minute default (already increased from upstream's 5 minutes) is still too short for complex agentic tasks such as multi-file implementations, upstream syncs, and thorough research sessions.

The existing task-timeout entry in .fork-features/manifest.json also needs correcting — it only lists async-tasks.ts in modifiedFiles but is missing tool/task.ts, which is the second independent location.

Changes Required

  1. packages/opencode/src/session/async-tasks.ts — change DEFAULT_TASK_TIMEOUT from 10 * 60 * 1000 to 30 * 60 * 1000
  2. packages/opencode/src/tool/task.ts — change taskTimeoutMs from 10 * 60 * 1000 to 30 * 60 * 1000
  3. .fork-features/manifest.json — update task-timeout entry:
    • Add tool/task.ts to modifiedFiles
    • Update description to reflect 30-minute default and correct both locations
    • Update criticalCode markers to 30 * 60 * 1000

Quality Gates (Non-Negotiable)

  • Both timeout locations updated
  • Manifest task-timeout entry updated with correct modifiedFiles, description, and criticalCode
  • bun run typecheck passes (0 errors)
  • bun test passes (0 failures)
  • bun run .fork-features/verify.ts passes

Acceptance Criteria

  • Both async-tasks.ts and task.ts use 30 * 60 * 1000 as timeout
  • Manifest accurately reflects both modified files and new timeout value
  • All local checks pass before push

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