Skip to content

Session title generation silently fails with no fallback or logging #29734

Closed as not planned

Description

@BenSharir

When the configured small_model fails (rate limit, model not found, proxy error), ensureTitle silently swallows the error via Effect.ignore. Sessions get generic timestamp titles. No fallback models are tried, and no warning is logged. This makes the issue very hard to diagnose.

Steps to reproduce:

  1. Configure small_model to a model that returns errors (e.g., an exhausted quota model)
  2. Create a new session
  3. Observe the session gets a generic timestamp title with no logs

Expected behavior: Try fallback models from other providers, or at least log a warning when title generation fails.

Activity

  1. github-actions commented on May 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues and confirm whether your report adds new information not covered by the above.

  2. BenSharir commented on May 28, 2026

    @BenSharir
    Author

    Thanks for flagging. After reviewing:

    This issue (#29734) and PR #29735 address the fallback and logging side:

    1. Add cross-provider fallback chain when primary model fails
    2. Replace Effect.ignore with warning logs so failures are visible

    This complements but doesn't fully replace #25344's fix for the ?? vs Effect.orElse semantics. The PR should help with #26181's "unavailable gpt-5-nano" scenario by trying other providers.

    Should I close this as a duplicate of #25344, or keep it open as the "solution" counterpart to that issue's "diagnosis"?

  3. skwid138 commented on Jun 3, 2026

    @skwid138

    Reproduced on 1.15.13 — swallowed title-gen failure hid an actionable HTTP 400

    Concrete instance of swallowed title-generation failure (ensureTitle wrapped in Effect.ignore in session/prompt.ts). Version: opencode 1.15.13.

    Symptom: new sessions stayed titled "New session". I didn't see any warning at the default log level; I only found the cause with --log-level DEBUG.

    What the debug log showed:

    1. The configured small_model (openai/gpt-5-mini) returned model_not_found (unavailable for my account).
    2. The title call then routed to the session model instead of a small model — log fields small=false agent=gandalf, providerID=github-copilot modelID=claude-opus-4.7.
    3. That call sent reasoning_effort: "low", which the model rejected:
      HTTP 400 invalid_reasoning_effort:
      reasoning_effort "low" is not supported by model claude-opus-4.7; supported values: [medium]
      
    4. The 400 was swallowed by Effect.ignore, so the session silently kept its default title.

    Repro I used:

    1. In opencode.jsonc: session model github-copilot/claude-opus-4.7, small_model set to openai/gpt-5-mini (unavailable for my account — any model returning model_not_found for yours should do).
    2. Start a new session and send a first prompt (title generation fires on the first message).
    3. Title stays "New session"; the 400 appears only at DEBUG level.

    Workaround: set small_model to a model available for my account (openai/gpt-5.4-mini); the title call then routes providerID=openai modelID=gpt-5.4-mini small=true agent=title and succeeds.

    The underlying error was actionable (unavailable small model + an incompatible param on the session-model call), but the silent swallow meant it couldn't be diagnosed without reading the DEBUG log. A single WARN like "title generation failed: " would surface the cause without DEBUG-level log inspection. Related: #29737 (logging) and #27939 (configurable fallback chains via agent.title.fallbacks). See also #20269 for the effort-parameter angle.

  4. BenSharir commented on Jun 11, 2026

    @BenSharir
    Author

    Update (2026-08-12): This issue continues to affect users. Since filing, 4 more reports have appeared: #30662, #31042, #31592, #31879 — all describing the same silent title generation failure.

    Our workaround for local setups: avoid setting agent.title.model in project configs entirely, and rely on small_model with a subscription-included model (e.g., anthropic/claude-haiku-4-5). The agent.title.model override has no fallback chain, so a single model failure silently degrades to timestamp titles.

    PR #29737 (this issue's fix) is a minimal 4-line change that replaces Effect.ignore with Effect.catchCause + warning log, making failures visible. Just rebased onto latest dev — all CI checks passed previously. Would appreciate a review when maintainers have time.

    For the fuller solution (fallback chains), see PR #27939 by @loss-and-quick.

  5. added a commit that references this issue on Jun 11, 2026
    d5ec277
  6. github-actions commented on Aug 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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