Skip to content

agent: Surface title generation error reason in tooltip instead of generic "Retry"#57659

Open
mvanhorn wants to merge 1 commit into
zed-industries:mainfrom
mvanhorn:fix/57117-zed-title-generation-error-tooltip
Open

agent: Surface title generation error reason in tooltip instead of generic "Retry"#57659
mvanhorn wants to merge 1 commit into
zed-industries:mainfrom
mvanhorn:fix/57117-zed-title-generation-error-tooltip

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments (N/A)
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

When title generation fails the tooltip just said "Title generation failed. Retry" with no indication of why. For common, actionable failures (Anthropic 200K context overflow, rate limits, auth errors), the user has no way to know whether to switch model, wait, or fix configuration without opening the thread and re-running.

Replaced the bool title_generation_failed on Thread with Option<SharedString> carrying the actual error message. Tooltip now reads the stored reason and surfaces it inline; the Retry action still works the same way. When the reason is too long, it's truncated to a single tooltip-friendly line.

Tests verify the option round-trips through retry, that successful generation clears it, and that a long upstream message gets truncated rather than overflowing.

Closes #57117

Release Notes:

  • Fixed - Title generation failure tooltips now show the actual error reason (e.g. context window exceeded) instead of a generic "Retry" message.

AI was used for assistance.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 25, 2026
@maxdeviant maxdeviant changed the title fix: surface title generation error reason in tooltip instead of generic Retry agent: Surface title generation error reason in tooltip instead of generic Retry May 25, 2026
@maxdeviant maxdeviant changed the title agent: Surface title generation error reason in tooltip instead of generic Retry agent: Surface title generation error reason in tooltip instead of generic "Retry May 25, 2026
@maxdeviant maxdeviant changed the title agent: Surface title generation error reason in tooltip instead of generic "Retry agent: Surface title generation error reason in tooltip instead of generic "Retry" May 25, 2026
@smitbarmase smitbarmase added the area:ai/agent thread Feedback for Zed's Agent Thread label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai/agent thread Feedback for Zed's Agent Thread cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhelpful error "Title generation failed. Retry" does not mention cause (which is present in the logs)

2 participants