Add debug title command for session title generation#1622
Merged
dgageot merged 1 commit intodocker:mainfrom Feb 7, 2026
Merged
Add debug title command for session title generation#1622dgageot merged 1 commit intodocker:mainfrom
dgageot merged 1 commit intodocker:mainfrom
Conversation
Add a 'cagent debug title <agent-file> <question>' command that generates a session title using the same sessiontitle.Generator code path as the TUI, making it easy to debug title generation behavior. Assisted-By: cagent
Contributor
There was a problem hiding this comment.
Code Review Summary
✅ No issues found in the changed code
This PR adds a new cagent debug title command and fixes title generation for OpenAI gpt-5* and Gemini 3 Pro models.
Changes Reviewed
-
New debug title command (
cmd/root/debug.go)- Proper error handling throughout
- Cleanup function correctly implemented and deferred
- Title output correctly uses
fmt.Fprintln(title has no trailing newline)
-
Test refactoring (
e2e/)- Consolidated test helper functions
- New comprehensive tests for title generation across providers
-
Provider fixes
- OpenAI: Correctly detects gpt-5* models for Responses API
- Gemini: Properly handles Gemini 3's requirement for thinking (cannot fully disable)
Verification
All error paths are handled, resource cleanup is properly deferred, and the code follows Go best practices.
Great work! 🎉
krissetto
approved these changes
Feb 6, 2026
| ThinkingBudget: genai.Ptr(int32(0)), | ||
| model := strings.ToLower(c.ModelConfig.Model) | ||
| if strings.HasPrefix(model, "gemini-3-") { | ||
| // Gemini 3 models require thinking — they reject ThinkingBudget=0. |
Contributor
There was a problem hiding this comment.
google has been a pain in changing out their thinking works and needs to be configured 2-3 times already
Member
Author
There was a problem hiding this comment.
yes, that's why I started adding those tests
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.
Assisted-By: cagent