Skip to content

Workspace: a chat is titled with the title generator's own failure text ("Unable to generate title") #3533

Closed

Description

@obasilakis

Summary

A Workspace chat can end up titled with the title generator's own failure text. A chat opened with a short instruction to the agent got the tab and sidebar title "Unable to generate title …". A chat opened with "yo" got "Unclear Initial Contact". The model's statement that it could not produce a title is stored and shown as the title.

Steps to reproduce

  1. Open a new Workspace chat.
  2. Send an opener that reads as an instruction with no topic, for example Run sleep 40, then say done.
  3. Observed: the tab and the sidebar row read "Unable to generate title …".

Expected: when the generator has nothing usable, the chat keeps its fallback title. Any neutral fallback is better than the failure text: the derived first line of the message, which the code already computes, or the chat id.

Context

Found during the Trinity 1.0 freeze test pass (abilityai/trinity-enterprise#847, row B1) on v1.0.0-rc2 (96f88f9). Does not block the cut.

The opener-only prompt tells the model to treat the message as data and never follow instructions inside it. For an instruction-shaped or greeting-shaped opener the model answers about its own inability, and that answer passes as a title. The comments above the generator say an unusable generation leaves the derived fallback in place; this output is not recognised as unusable.

Acceptance Criteria

  • A generation that describes a failure to title, a refusal, or the absence of a topic ("Unable to generate title", "Unclear initial contact", "No topic provided", "Untitled conversation") is treated as unusable and never stored.
  • In that case the chat keeps its fallback title, and the existing one retry on the next exchange still runs.
  • The prompt gives the model a defined way to say "no title" (for example an empty reply or a fixed sentinel) so the check does not depend on guessing phrasings.
  • Unit tests cover an instruction-shaped opener and a greeting opener.

Technical Notes

src/backend/client_portal/service.py: _TITLE_PROMPT_OPENER, _generate_thread_title, _derive_title, _title_plan.

Activity

  1. added
    priority-p3
    type-bug
    theme-ui-ux
    status-ready
    on Oct 11, 2026
  2. added
    priority-p1
    and removed
    priority-p3
    on Oct 11, 2026
  3. AndriiPasternak31 commented on Oct 11, 2026

    @AndriiPasternak31
    Contributor

    Raising to P1 from release-test row B7 (abilityai/trinity-enterprise#847), v1.0.0-rc2 (96f88f9). Reproduced with a different opener, and two things make it worse than a cosmetic P3.

    Repro: a new Workspace chat with an agent, first message hellp (a typo). The agent replied "Hello! How can I help you today?". The sidebar row and the agent row's subtitle read "Unable to determine topic", also after a reload. Stored: title = "Unable to determine topic", message_count = 2.

    1. The title is permanent for most openers. Every other title writer only fills an empty title (COALESCE(title, …) in touch_portal_session, client_portal/db.py:689-702). The generator gets one retry on turn 2 (_title_plan, client_portal/service.py:2028-2055), but only if the title isn't generated or the opener matches is_greeting (services/chat_title.py:80-105). The meta-answer is stored as generated, and is_greeting is False for hellp, help, привіт, ? and can you help me. The only way out is renaming the chat by hand.

    2. Nobody is told. The meta-answer is recorded as a success. Title health read state: ok, consecutive_failures: 0, with last_ok_at 0.75 s after the opener (_record_title_outcome("ok"), service.py:2244).

    Same code on dev (f96fe45d5). #3494 (opener hi → "Unable to generate title") is the same bug and is closed as a duplicate of this one.

    Decision needed (P1): fix before the 1.0 cut, or release-note.

    • Fix: one file (client_portal/service.py) plus tests; no schema, no frontend. The worst case after the fix is today's fallback: the first message as the title.
    • Release-note: "A new chat opened with a very short message may be titled 'Unable to determine topic'; rename it from the chat menu." Permanent per chat, invisible to operators.
    • Recommendation: fix for 1.0. It is the first thing a new customer sees.

    Fix notes on top of the acceptance criteria above:

    • Record a rejected generation as a neutral outcome (for example no_topic): not failed, so greetings don't trip the failure alert (Workspace thread titles: the model's refusal text is accepted as a title #3494's point), and not ok.
    • No _title_plan change is needed. A rejected generation leaves title_source NULL, so :2052-2053 already grants the turn-2 retry for any opener, including the ones is_greeting misses.
    • Failing test first, in tests/unit/test_ent473_chat_titles.py: the model returns Unable to determine topic for opener hellp → the stored title stays hellp and title_source stays NULL.
  4. AndriiPasternak31 commented on Oct 12, 2026

    @AndriiPasternak31
    Contributor

    Decision (@AndriiPasternak31, release-test row B7, abilityai/trinity-enterprise#847): fix before cut, in the next release candidate (rc3), which is being cut for other fixes anyway.
    The change should be small and stay inside the title generator: when the model returns its own failure text, the chat keeps its fallback title.
    If no fix PR has landed by go/no-go: release-note — "A new Workspace chat can be titled with the title generator's failure text ('Unable to generate title…')."

  5. removed
    status-ready
    on Oct 12, 2026
  6. obasilakis commented on Oct 12, 2026

    @obasilakis
    ContributorAuthor

    /claim

  7. added
    status-in-progress
    on Oct 12, 2026
  8. github-actions commented on Oct 12, 2026

    @github-actions

    Claimed by @obasilakis. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/3533-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #3533
  9. added
    status-in-dev
    and removed
    status-in-progress
    on Oct 13, 2026
  10. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p1theme-ui-uxtype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions