Skip to content

fix: surface useful errors when session title generation fails#3052

Merged
dgageot merged 1 commit into
docker:mainfrom
dgageot:fix-title-generation-error
Jun 10, 2026
Merged

fix: surface useful errors when session title generation fails#3052
dgageot merged 1 commit into
docker:mainfrom
dgageot:fix-title-generation-error

Conversation

@dgageot

@dgageot dgageot commented Jun 10, 2026

Copy link
Copy Markdown
Member

When session title generation failed, the error message was unhelpful — users would see something like docker agent debug title: exit status 1 with no indication of what actually went wrong.

The fix improves error reporting in two ways. The pkg/sessiontitle generator now tags each failing model attempt with its model ID and aggregates all attempts via errors.Join, instead of keeping only the last error. The error message now reads like all N title model(s) failed: model "X": <cause>. The docker agent debug title command no longer double-wraps the error and includes the agent name for context.

A unit test asserts that the failure message lists every model and its cause. Changes validated with task lint (0 issues) and task test (all pass).

@dgageot dgageot requested a review from a team as a code owner June 10, 2026 11:07

@docker-agent docker-agent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The changes correctly improve error reporting for session title generation failures. The aggregation, per-model error tagging, and the removal of double-wrapping in the debug command are all implemented cleanly with no bugs detected.

The session title generator only kept the last model's error, never said
which model failed, and the debug command double-wrapped it, so a bare
leaf like "exit status 1" reached the user with no context.

Tag each failing attempt with its model ID, aggregate all attempts via
errors.Join, and include the agent name in the debug title command error.
@dgageot dgageot force-pushed the fix-title-generation-error branch from cf85263 to 385fcd9 Compare June 10, 2026 11:15
@aheritier aheritier added area/cli CLI commands, flags, output formatting area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) kind/fix PR fixes a bug (maps to fix: commit prefix) labels Jun 10, 2026
@dgageot dgageot merged commit 7e53a8a into docker:main Jun 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli CLI commands, flags, output formatting area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) kind/fix PR fixes a bug (maps to fix: commit prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants