GeezerVison is showing github.com — fix(cli): keep the triage picker open after an invalid numbered choice by only21mil · Pull Request #42046 · pingdotgg/t3code
Conversation
At the t3 triage agent picker, an answer like 1.5 or 1x started the first agent instead of asking again. The picker read the answer with Number.parseInt, which stops at the first character that is not a digit.
The picker now takes a number only when the whole trimmed answer is one of the numbers it listed. Anything else falls through to the agent-id match (still case-insensitive) and then asks again, as before.
Scope
One line in apps/server/src/cli/triage.ts, plus a test. No issue: the bug is small and the steps below reproduce it.
Steps
An AI agent ran node apps/server/src/bin.ts triage --base-dir <scratch> on a real Linux PTY, with stub claude and codex scripts on PATH that only print started <name>. It answered 1.5, then 2 if asked again.
| Before (main) | After |
Run triage with:
[1] Claude Code
[2] Codex
> 1.5
Starting Claude Code. It will ask what went wrong.
started claude
|
Run triage with:
[1] Claude Code
[2] Codex
> 1.5
Run triage with:
[1] Claude Code
[2] Codex
> 2
Starting Codex. It will ask what went wrong.
started codex
|
Tests
The new triage.test.ts cases drive the picker through terminal streams. 1.5, 1x, then 2 starts Codex after three questions. 2x, then CLAUDE starts Claude after two. On main both fail: one question is asked and an agent starts. An AI agent ran the file 3 times on Node 26.13.1 (10/10 passing), and vp run check:changed passes.
Not shown
The Windows desktop launcher console, and macOS.
Generated with Claude Opus 5.5 in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The t3 triage agent picker read answers with Number.parseInt, so 1.5 or 1x launched the first agent. It now takes a number only when the whole answer is one of the listed numbers, and asks again otherwise.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The agent picker now matches trimmed answers against exact one-based menu numbers or agent IDs without regard to case. Unmatched answers continue prompting. Tests cover valid choices, whitespace, case differences, and invalid answers.
Changes: Agent picker selection
| Layer / File(s) |
Summary |
Answer matching and picker integration apps/server/src/cli/triage.ts, apps/server/src/cli/triage.test.ts |
matchAgentAnswer matches trimmed answers to exact one-based menu numbers or case-insensitive agent IDs. pickAgent uses this helper and continues prompting when an answer does not match. Tests cover valid choices and invalid answers. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: motaghi, shethshlok
Merge Risk: Minimal · up to b2f36
-
The triage agent picker now rejects partial numeric answers such as 1.5 or 1x and asks again instead of starting the wrong agent. The change is small and covered by tests, so merge risk is minimal.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the change: the triage agent picker no longer accepts a partial numeric answer such as "1.5" or "1x" as a numbered choice, and it asks again. The diff matches this, since matchAgentAns… |
| Description check |
 |
The description follows the template sections (Problem, Change, Scope, Verification) in substance. It explains the bug: Number.parseInt accepts a leading digit and ignores the rest. It describes the f… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the change: the triage agent picker no longer accepts a partial numeric answer such as "1.5" or "1x" as a numbered choice, and it asks again. The diff matches this, since matchAgentAnswer accepts a number only when the whole trimmed answer matches a listed number. The title is 70 characters and follows the conventional commit format the template suggests.
Full details: Description check
-
Explanation
The description follows the template sections (Problem, Change, Scope, Verification) in substance. It explains the bug: Number.parseInt accepts a leading digit and ignores the rest. It describes the fix as a whole-answer match. Scope gives a reason for having no linked issue. Verification gives reproduction steps on a real Linux PTY, before and after output, test results, and the checks not run (Windows launcher and macOS). The Problem and Change headings are not labeled as such, and the description does not link an issue or state whether a maintainer requested the PR. The template asks for a model and harness line, and the description includes one (Claude Opus 5.5 in T3 Code Nightly). These gaps are minor.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between ab21e7a and b2f369e.
Files selected for processing: 2
-
apps/server/src/cli/triage.test.ts
apps/server/src/cli/triage.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Move answer matching into matchAgentAnswer and test it as a table, in place
of the test that swapped process.stdin/stdout and spied on readline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Evidence
Evidence: real CLI, Linux PTY (100×26), identical terminal rendering, fresh data for every invocation, only Claude and Codex stand-ins on PATH.
Four fresh runs per commit: 1.5 → 2; 2x → CLAUDE; 1x → 2; control abc → 2. Follow-up input was sent only when the picker remained open.
Base reproduced all three invalid-number selections. Head kept asking and accepted the subsequent displayed number or case-insensitive agent ID. The abc control worked on both.
Reproduction and recording driver · Capture renderer · Before transcript · After transcript
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|