feat(cli): npx t3 triage hands a broken install to your own coding agent - #56
Merged
Conversation
…nt (#6563) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 324ddda3146d54cc7195a67ef5506e93674085ba)
Ports upstream #6563 as a Pylon feature rather than a cherry-pick. `t3 triage` collects machine facts — version, OS, paths, server liveness — into a scratch directory and launches claude or codex with a playbook that walks the agent from "what went wrong" through diagnosis to a well-formed issue. Upstream's version could not be adopted as-is: its playbook hardcodes pingdotgg/t3code, searches T3's issues, fetches a newer playbook from T3's raw GitHub URL, and builds a t3code issues/new link. Running it in Pylon would have funnelled Pylon users' bug reports into T3's tracker. The destination is configuration now, not a constant. `PYLON_TRIAGE_REPOSITORY` names the repository to search and file against; it is unset by default, because `pylon-code/pylon` is private and pointing users at a tracker they cannot open is worse than pointing them nowhere. With it unset the playbook tells the agent to write the finished issue to a file and hand over the path instead of trying to post. Two tests cover both branches. Upstream's "check for a newer playbook" step is dropped for the same reason: a private repo has no unauthenticated raw URL, so the embedded copy is the only playbook a release can follow. The remaining steps are renumbered and the byte-identity test between PLAYBOOK.md and TRIAGE_PLAYBOOK still holds.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Six findings from the review of the port, in rough order of severity. **Triage inspected the wrong install.** `resolveBaseDir` falls back to `~/.t3`, which is T3 Code's runtime home, not Pylon's `~/.pylon-code`. On a Pylon Desktop machine that reported the server as not running, pointed the agent at another product's database, logs, and secrets directory, and created the scratch dir inside a live T3 install. Triage now prefers Pylon's home when nothing is specified and it exists. The shared resolver's default is left alone: every other CLI command depends on it, so changing it belongs in its own change. **One repository could not serve both roles.** The clone source and the issue tracker are the same repo upstream but not here, so the documented example (an issues-only repo) would have had the agent cloning a tree with no code in it. Split into PYLON_TRIAGE_REPOSITORY and PYLON_TRIAGE_SOURCE_REPOSITORY, with the playbook and context file naming which is which. **An empty value read as configured.** `Config.string` accepts "", so an exported-but-blank variable defeated the "not configured" guard and rendered a blank repository line. Blank and whitespace now normalize to unset. **The nightly caveat was inside the git ref.** `releaseTag` carried "(nightly build; if this tag does not exist, clone main)", which the playbook substitutes verbatim into `git clone --branch`. The tag is bare again and the caveat moved to its own field. **The label could lose a report.** `via-triage` does not exist in this repo, so `gh issue create --label via-triage` would fail after the agent had written the issue. The playbook now files without the label rather than losing the work. **No user documentation.** Added docs/user/triage.md; the two environment variables were documented only in a source comment.
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.
Ports upstream
#6563as a Pylon feature rather than a cherry-pick.t3 triagecollects machine facts — version, OS, paths, server liveness — into a scratch directory, then launches claude or codex with a playbook that walks the agent from "what went wrong" through diagnosis to a well-formed issue.This was CS-9 in the 2026-08-19 upstream review, held back from that batch because it could not be adopted as-is.
Why it needed a port, not a cherry-pick
Upstream's playbook hardcodes
pingdotgg/t3code: it searches T3's issues, fetches a newer playbook from T3's raw GitHub URL, and builds at3code/issues/newlink. Shipping that in Pylon would have funnelled Pylon users' bug reports into T3's tracker.The decision I had to make, and what I assumed
pylon-code/pylonis private, so there is no tracker a user's generated issue can reach. Rather than guess a destination, the repository is configuration:PYLON_TRIAGE_REPOSITORYnames the repository to clone, search, and file against.That is the one judgement call in here. If you want triage issues landing somewhere real, set that variable (a public
pylon-issuesrepo would work) and the full flow lights up with no code change.Upstream's "check for a newer playbook" step is dropped for the same reason — a private repo has no unauthenticated raw URL, so the embedded copy is the only playbook a release can follow. Remaining steps are renumbered, and the cross-reference that pointed at the removed step is rewritten.
Verification
.github/triage/PLAYBOOK.mdand the embeddedTRIAGE_PLAYBOOK. I regenerated the constant from the file programmatically rather than hand-editing both, so they cannot drift.t3package actually ran, not a no-op filter).npx t3,T3CODE_HOME,@t3tools/shared) are untouched per AGENTS.md.Note
.github/ISSUE_TEMPLATE/via-triage.ymlships as-is — it is product-neutral, and while the repo is private only collaborators can use it. It costs nothing and is ready if a public tracker opens.Model: Claude Opus 5 in Pylon.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.