Skip to content

feat(cli): npx t3 triage hands a broken install to your own coding agent - #56

Merged
rynfar merged 3 commits into
pylonfrom
feat/pylon-triage
Aug 19, 2026
Merged

feat(cli): npx t3 triage hands a broken install to your own coding agent#56
rynfar merged 3 commits into
pylonfrom
feat/pylon-triage

Conversation

@rynfar

@rynfar rynfar commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

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, 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 a t3code/issues/new link. 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/pylon is private, so there is no tracker a user's generated issue can reach. Rather than guess a destination, the repository is configuration:

  • PYLON_TRIAGE_REPOSITORY names the repository to clone, search, and file against.
  • It is unset by default. With it unset, the context file tells the agent not to post — instead it writes the finished issue to a file next to the context file and hands over the path.

That is the one judgement call in here. If you want triage issues landing somewhere real, set that variable (a public pylon-issues repo 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

  • 6 tests pass, including upstream's byte-identity check between .github/triage/PLAYBOOK.md and the embedded TRIAGE_PLAYBOOK. I regenerated the constant from the file programmatically rather than hand-editing both, so they cannot drift.
  • Two new tests cover the configured and unconfigured repository branches.
  • Server typecheck clean (verified the t3 package actually ran, not a no-op filter).
  • Swept the whole feature for T3 product identity: none remains. Compatibility identifiers (npx t3, T3CODE_HOME, @t3tools/shared) are untouched per AGENTS.md.

Note

.github/ISSUE_TEMPLATE/via-triage.yml ships 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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

t3dotgg and others added 2 commits August 19, 2026 03:05
…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.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Aug 19, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 12.6 KiB 12.6 KiB −25 B (−0.2%) 15.1 KiB
Codex Thread snapshot wire 6.3 KiB 6.3 KiB −8 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.3 KiB 6.3 KiB −17 B (−0.3%) 7.8 KiB
Codex Live turn WebSocket decoded 51.8 KiB 51.8 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 16 16 0 (0.0%) 21
Claude Total thread wire 12.6 KiB 12.6 KiB −4 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 6.3 KiB 6.3 KiB −2 B (−0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.3 KiB 6.3 KiB −2 B (−0.0%) 7.8 KiB
Claude Live turn WebSocket decoded 52.7 KiB 52.7 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 16 16 0 (0.0%) 21

Baseline: d9a351e · PR result: fedbdc9 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 99.8 KiB
  • Claude decoded thread snapshot: 100.6 KiB

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.
@rynfar
rynfar merged commit c68afa4 into pylon Aug 19, 2026
11 checks passed
@rynfar
rynfar deleted the feat/pylon-triage branch August 19, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants