Skip to content

discuss: provider calls use the 120s default timeout — long-context rounds on reasoning models always die at 'timeout: global' #756

Closed

Description

@ajianaz

What

The discussion factory (discussion_host::factory) builds its providers with the default 120 s global HTTP timeout, and there is no way to raise it for discussions. As the shared context grows round over round (round 2 of the fleet research reached ~25k tokens of context), generation time through a reasoning model (GLM via Z.AI) exceeds 120 s and every call dies with timeout: global — the discussion can never finish by itself; the owner must resume repeatedly, and each resume dies again at the same wall.

Evidence (live, 2026-11-14, tole v0.11.0 release binary)

  • tole discuss start with 4 participants, 5 criteria, --max-rounds 10 (GLM-5.2 via Z.AI coding endpoint):
    • round 1 completed (17,552 tokens); scribe died with timeout: global (digest refused, round passed on as written — engine degraded gracefully)
    • round 2, rustdev turn: the provider failed: timeout: global → discussion saved, resume required
    • after resume: round 2, qa turn: json: timeout: global at line 1 column 1 → resume required again
  • tole audit --discussion d-fe-research2: ledger healthy across resumes (crash-safety works exactly as designed — this is a configuration ceiling, not a durability bug)
  • Root cause in crates/tole-cli/src/discussion_host.rs: factory() calls OpenAiProvider::new(c).with_secrets(...).with_streaming(false).with_system_prompt(...) — no .with_timeout(...), so OpenAiProvider::new's default Duration::from_secs(120) applies. Note run/chat stream their responses, so their wall-clock pressure is far lower; discussions deliberately use no streaming (the whole reply must land) — that is why only discussions hit this.
  • Verified fix path: adding .with_timeout(Duration::from_secs(600)) in factory() unblocked the research locally (patched debug build, discussion resumed past round 2).

Expected

  • A configuration knob: e.g. [discussions] request_timeout_secs (user config), default keeping today's 120 s for provider-agnostic safety, or a smarter default (600 s) for the discussion factory only.
  • Alternatively/additionally: the scribe and the participant calls could retry once on timeout: global before failing the turn (the failure currently costs a whole resume cycle).

Testing

  • Discussion of 4 participants × 5 criteria on a reasoning model completes without manual resumes (timeout ≥ 600 s)
  • Default behavior unchanged for small/fast models (120 s still applies when the knob is unset)
  • Scribe timeout retries once (or is configurable) instead of refusing the digest on first timeout
  • Doctor line shows the effective discussion request timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions