fix: surface useful errors when session title generation fails#3052
Merged
Conversation
docker-agent
left a comment
There was a problem hiding this comment.
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.
cf85263 to
385fcd9
Compare
trungutt
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When session title generation failed, the error message was unhelpful — users would see something like
docker agent debug title: exit status 1with no indication of what actually went wrong.The fix improves error reporting in two ways. The
pkg/sessiontitlegenerator now tags each failing model attempt with its model ID and aggregates all attempts viaerrors.Join, instead of keeping only the last error. The error message now reads likeall N title model(s) failed: model "X": <cause>. Thedocker agent debug titlecommand 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) andtask test(all pass).