Skip to content

feat: improve session titles to include task descriptions#211

Merged
marcusquinn merged 4 commits intomainfrom
feature/session-title-task-description
Jan 25, 2026
Merged

feat: improve session titles to include task descriptions#211
marcusquinn merged 4 commits intomainfrom
feature/session-title-task-description

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 25, 2026

Summary

When using /full-loop, /ralph-task, or /ralph-loop with a task ID (like t061), the session title now includes the actual task description instead of just the generic format.

Before: Full loop development for t061
After: t061: Improve session title to include task description

Changes

  • Add "Step 0: Resolve Task ID and Set Session Title" to full-loop.md command
  • Update generate-opencode-commands.sh to include session title guidance for:
    • /full-loop - Look up task description from TODO.md when given a task ID
    • /ralph-task - Set session title with task ID and description
    • /ralph-loop - Set descriptive session title from prompt

How It Works

  1. When the argument matches a task ID pattern (t\d+), the AI looks up the task description from TODO.md
  2. The session-rename tool is called with format: "t061: Task description here"
  3. For non-task-ID arguments, the description itself is used as the session title

Testing

Run ./setup.sh to regenerate commands, then use /full-loop t001 (or any task ID from your TODO.md) to verify the session title is descriptive.

Summary by CodeRabbit

  • New Features
    • Automatic task resolution: detect task IDs and fetch matching descriptions to create informative session titles.
    • Conditional session-title setting: if no title exists, a concise title (~60 chars) is auto-applied before starting loops.
    • Full-loop and loop entry points support task-ID invocation with automatic description lookup and sensible fallbacks when descriptions are missing.

✏️ Tip: You can customize this high-level summary in your review settings.

When using /full-loop, /ralph-task, or /ralph-loop with a task ID,
the session title now includes the actual task description instead
of just the task ID.

Changes:
- Add Step 0 to full-loop.md for task ID resolution and session naming
- Update generate-opencode-commands.sh to include session title guidance
- Add examples showing good vs bad session title formats

Before: 'Full loop development for t061'
After: 't061: Improve session title to include task description'
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a Step 0 to full-loop: detect a leading task ID (t\d+) or treat the first arg as a description, look up descriptions in TODO.md when an ID is found, and set a concise session title via session-rename. Mirrors this conditional session-title behavior in Ralph loop entry points and examples.

Changes

Cohort / File(s) Summary
Documentation
.agent/scripts/commands/full-loop.md
Adds Step 0: detect first positional arg, match t\d+, lookup description in TODO.md via regex, set session title with session-rename (use full description or fallback to "t### (task not found in TODO.md)"), and truncate long descriptions for concise titles. Includes usage examples.
Script changes
.agent/scripts/generate-opencode-commands.sh
Adds conditional session-title logic for Ralph loop entry points: invoke session-rename when no title exists, derive ~60-char titles from prompts, and set task-prefixed titles (e.g., t042: ...) before starting Ralph loop. Updates full-loop example to show /full-loop t061 behavior.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FullLoop as Full Loop Script
    participant TodoMD as TODO.md
    participant SessionMgr as Session Manager
    participant RalphLoop as Ralph Loop

    User->>FullLoop: Invoke /full-loop [task-id or description]
    FullLoop->>FullLoop: Extract first positional arg (skip flags)
    alt Matches t\d+
        FullLoop->>TodoMD: Regex lookup for task description
        alt Description found
            TodoMD-->>FullLoop: Return full description
            FullLoop->>SessionMgr: session-rename "t061: Full description"
        else Not found
            TodoMD-->>FullLoop: No match
            FullLoop->>SessionMgr: session-rename "t061 (task not found in TODO.md)"
        end
    else First arg is description
        FullLoop->>SessionMgr: session-rename "Truncated description (~60 chars)"
    end
    SessionMgr-->>FullLoop: Title set
    FullLoop->>RalphLoop: Start Ralph loop with session context
    RalphLoop-->>User: Run loop phases / iterations
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🛠️ A task ID hums, the script leans in,
TODO.md whispers the title to begin,
Sessions rename, concise and bright,
Ralph loops wake and run through the night,
Automated steps sing DevOps delight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: improving session titles to include task descriptions from TODO.md, which is the core objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the clarity and utility of session titles within the agent's development workflow. By integrating task descriptions directly into session titles for commands like /full-loop and /ralph-task, and ensuring descriptive titles for /ralph-loop, it makes it much easier to understand the context and purpose of ongoing development sessions at a glance.

Highlights

  • Enhanced Session Titles: Session titles for /full-loop, /ralph-task, and /ralph-loop commands now provide more descriptive information, improving clarity and traceability.
  • Task Description Integration: When a task ID (e.g., t061) is provided to /full-loop or /ralph-task, the session title will automatically include the corresponding task description from TODO.md.
  • Improved Clarity: The changes ensure session titles are more informative, moving from generic formats (e.g., "Full loop development for t061") to specific ones (e.g., "t061: Improve session title to include task description").
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 447 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Jan 25 15:07:05 UTC 2026: Code review monitoring started
Sun Jan 25 15:07:05 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 447
Sun Jan 25 15:07:05 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sun Jan 25 15:07:07 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 447
  • VULNERABILITIES: 0

Generated on: Sun Jan 25 15:08:29 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a great improvement, making session titles more descriptive by including task details. The changes are clearly explained and implemented consistently across the affected commands. I've included a couple of suggestions to enhance the robustness of the task lookup logic and improve the long-term maintainability of the command documentation.


1. Look up the task description from TODO.md:
```bash
grep "^- \[ \] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed 's/^- \[ \] [^ ]* //'

Choose a reason for hiding this comment

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

medium

The current grep command only finds open tasks (- [ ]). This might be too restrictive if a user wants to re-run a loop on a completed (- [x]) or declined (- [-]) task. Using grep -E with an extended regular expression would make this more robust by matching any of these task states. The sed command should also be updated accordingly to handle these cases.

Suggested change
grep "^- \[ \] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed 's/^- \[ \] [^ ]* //'
grep -E "^- \[( |x|-)\] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed -E 's/^- \[( |x|-)\] [^ ]* //'


Start a full development loop for: $ARGUMENTS

**IMPORTANT - Session Title**: If the argument is a task ID (like `t061`), look up the task description from TODO.md and use it for the session title. Call `session-rename` with format: `"t061: Task description here"` instead of just `"Full loop development for t061"`.

Choose a reason for hiding this comment

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

medium

This instruction about the session title duplicates the information recently added to .agent/scripts/commands/full-loop.md. To maintain a single source of truth and avoid potential inconsistencies in the future, it would be better to remove this summary. The existing instruction on line 1404 (Read ~/.aidevops/agents/scripts/commands/full-loop.md...) is sufficient to guide the agent.

@augmentcode
Copy link

augmentcode bot commented Jan 25, 2026

🤖 Augment PR Summary

Summary: Session titles for loop commands now incorporate TODO task descriptions when invoked with a tNNN task ID.

Changes: Added a “Step 0” to full-loop.md that resolves task IDs via TODO.md and calls session-rename.

Updated generate-opencode-commands.sh to document session-title behavior for /full-loop, /ralph-task, and /ralph-loop.

Added examples showing /full-loop t061 and the recommended "t061: …" title format.

Why: Makes sessions easier to identify by using the real task description rather than generic titles.

Notes: Title resolution relies on extracting the first matching TODO line for the task ID.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


## Step 0: Resolve Task ID and Set Session Title

**IMPORTANT**: Before proceeding, check if the argument is a task ID (matches pattern `t\d+` like `t061`).
Copy link

Choose a reason for hiding this comment

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

If users run /full-loop t061 --max-task-iterations 30, $ARGUMENTS may include flags, so the t\d+ check and TODO lookup could fail or produce a noisy session title. Consider clarifying that the check/lookup should use only the first positional token (the task ID) rather than the entire raw argument string.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


1. Look up the task description from TODO.md:
```bash
grep "^- \[ \] $ARGUMENTS " TODO.md 2>/dev/null | head -1 | sed 's/^- \[ \] [^ ]* //'
Copy link

Choose a reason for hiding this comment

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

This grep will return empty if the task is marked complete (- [x]) or if the TODO line doesn’t match the exact spacing, which would leave the session title without a description. Consider documenting a fallback behavior when no description is found (e.g., keep the ID-only title) to avoid blank/incorrect titles.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


Arguments: $ARGUMENTS

**Session Title**: Set a descriptive session title using `session-rename` tool. Use a concise version of the prompt (truncate to ~60 chars if needed).
Copy link

Choose a reason for hiding this comment

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

Since /ralph-task already sets the session title to t042: …, this /ralph-loop instruction may overwrite that more specific title when the loop is started. Consider clarifying precedence (don’t rename if a task-prefixed title is already set) so task IDs remain visible.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

- Use extended regex to match completed/declined tasks (Gemini)
- Remove duplicate session title instruction (Gemini)
- Clarify to use first positional token, not full args (Augment)
- Add fallback behavior when task not found in TODO.md (Augment)
- Clarify ralph-loop precedence to not overwrite task titles (Augment)
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 447 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Jan 25 17:23:27 UTC 2026: Code review monitoring started
Sun Jan 25 17:23:27 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 447
Sun Jan 25 17:23:27 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sun Jan 25 17:23:29 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 447
  • VULNERABILITIES: 0

Generated on: Sun Jan 25 17:24:56 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.agent/scripts/commands/full-loop.md:
- Around line 17-20: Add a blank line before the fenced code block in
.agent/scripts/commands/full-loop.md so the grep command block renders
correctly; specifically insert an empty line immediately before the line
starting with ```bash that precedes the grep -E "^- \[( |x|-)\] $TASK_ID "
TODO.md ... | sed -E 's/^- \[( |x|-)\] [^ ]* //' snippet to ensure proper
Markdown parsing.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 447 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Jan 25 17:26:48 UTC 2026: Code review monitoring started
Sun Jan 25 17:26:49 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 447
Sun Jan 25 17:26:49 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sun Jan 25 17:26:51 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 447
  • VULNERABILITIES: 0

Generated on: Sun Jan 25 17:28:16 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn
Copy link
Owner Author

@coderabbitai review - The markdown formatting issue has been fixed in commit 74e9df2. Please re-review.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

@marcusquinn: Thank you for fixing the markdown formatting issue! I'll re-review the PR now to check the changes in commit 74e9df2 and provide fresh feedback.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.agent/scripts/commands/full-loop.md:
- Around line 19-21: The grep invocation uses $TASK_ID but that variable is
never set; update the argument extraction logic that processes $ARGUMENTS to
parse and assign the task identifier into TASK_ID (reusing the same extraction
pattern suggested for lines 13-14) before the grep line, so TASK_ID holds the
extracted value and the grep -E "^- \[( |x|-)\] $TASK_ID " ... command can run
correctly.
- Around line 23-26: Add an explicit invocation pattern for the session-rename
tool: call session-rename with a single string argument that concatenates the
task ID, a colon and space, and the task description (i.e., "<TASK_ID>:
<TASK_DESC>"); document both forms: the shell form where you pass that string as
the single CLI argument and the MCP/tool form where you call session-rename with
a title parameter set to that same string. Reference the symbol session-rename
and the variables TASK_ID and TASK_DESC so agents know to build the title from
those values.
♻️ Duplicate comments (1)
.agent/scripts/commands/full-loop.md (1)

13-14: Provide the actual extraction logic for the first positional argument.

The instruction states to extract the first positional argument while ignoring flags like --max-task-iterations, but doesn't provide the bash code to perform this extraction. The AI agent needs concrete implementation guidance.

🔧 Suggested implementation

Add the extraction logic before the task ID check:

 **IMPORTANT**: Before proceeding, extract the first positional argument (ignoring flags like `--max-task-iterations`) and check if it's a task ID (matches pattern `t\d+` like `t061`).
 
+Extract the first positional argument:
+
+```bash
+# Extract first non-flag argument as potential task ID
+TASK_ID=""
+for arg in $ARGUMENTS; do
+  if [[ ! "$arg" =~ ^-- ]]; then
+    TASK_ID="$arg"
+    break
+  fi
+done
+```
+
+Then check if it matches the task ID pattern:
+
+```bash
+if [[ "$TASK_ID" =~ ^t[0-9]+$ ]]; then
+  # This is a task ID - proceed with lookup
+else
+  # This is a description - use directly
+fi
+```
+
 If the first argument is a task ID:
🧹 Nitpick comments (2)
.agent/scripts/commands/full-loop.md (2)

31-34: Clarify the truncation logic for long descriptions.

The instruction to "truncate to ~60 chars" is vague. The AI agent needs specific guidance on how to truncate: exact character limit, word-boundary breaking, ellipsis handling, etc.

✂️ Suggested truncation implementation
 If the first argument is NOT a task ID (it's a description):
 - Use the description directly for the session title
-- Call `session-rename` with a concise version if the description is very long (truncate to ~60 chars)
+- If the description exceeds 60 characters, truncate it:
+
+  ```bash
+  if [[ ${`#DESCRIPTION`} -gt 60 ]]; then
+    # Truncate at 57 chars and add ellipsis
+    TITLE="${DESCRIPTION:0:57}..."
+  else
+    TITLE="$DESCRIPTION"
+  fi
+  session-rename "$TITLE"
+  ```

29-30: Clarify how to store the task description for subsequent steps.

Line 30 mentions storing "the full task description for use in subsequent steps" but doesn't show how to store it or which subsequent steps will use it.

💡 Suggested enhancement
-4. Store the full task description for use in subsequent steps.
+4. Store the full task description for use in subsequent steps:
+
+   ```bash
+   # Store in environment variable for the session
+   export FULL_LOOP_TASK_DESC="$TASK_DESC"
+   ```
+
+   This description can be referenced by later steps in the workflow (e.g., for commit messages, PR descriptions).

Address CodeRabbit review feedback:
- Add explicit bash commands to extract TASK_ID from ARGUMENTS
- Show exact session-rename MCP tool invocation syntax
- Clarify fallback behavior when TASK_DESC is empty
@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 447 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Jan 25 17:34:27 UTC 2026: Code review monitoring started
Sun Jan 25 17:34:28 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 447
Sun Jan 25 17:34:28 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sun Jan 25 17:34:30 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 447
  • VULNERABILITIES: 0

Generated on: Sun Jan 25 17:35:52 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn
Copy link
Owner Author

@coderabbitai resolve - All review comments have been addressed in commit f20223f. The TASK_ID extraction and session-rename syntax are now explicitly defined.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

@marcusquinn: Thank you for addressing all the review comments! I've confirmed that commit f20223f includes the explicit TASK_ID extraction logic and session-rename syntax as discussed. The improvements look great—well done on clarifying the task resolution flow! 🎉

I'll resolve all my review comments now.

🐰✨
(⌐■_■)
<( )>
/
Mission accomplished!


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

✅ Actions performed

Comments resolved and changes approved.

@marcusquinn marcusquinn merged commit ada7bec into main Jan 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant