@kentcdodds/kody-issue-triagePublic
Loop-safe Cursor triage for Kody account run errors: fingerprint, cap, lease, one Discord message.
- Integrations
- triage
- runs
- cursor
- discord
- automation
- loop-safe
- License
- MIT
- Published
- August 21, 2026
- Pinned commit
db110be- Rating
- No ratings yet
- Forks
- 1
- Adaptation effort
- —
README
@kentcdodds/kody-issue-triage
Intent
Automatic, loop-safe triage for Kody account run errors (the Activity /
run_list issues), modeled on @kentcdodds/sentry-triage but never
one-agent-per-run. A burst like the 2026-08-16 skills repo.pushed storm
must produce at most one agent for that fingerprint, not thousands.
Success: unique standing failures get one Cursor cloud agent, one Discord
status message in #sentry-reports, and a recorded outcome — without this
package being able to fan out into a runaway of agents or more errors.
Guardrails (no runaway)
run.error.recordedhandler only writespackageStorage(). It does not spawn agents, post Discord, callrun_get, or start workflows.- Only the 15m
sweepjob may spawn../pause/./resumeare the operator kill switch; the job is enabled after a dry-run smoke test. - One agent per fingerprint (
surface+ owner + normalized error family), not per run id. TypeErrorreading XandExecution timed out after Nscollapse to coarse families sosonos_list_groupsvssonos_list_playersdoes not spawn two agents. JSON wrappers such asShade workflow event failed: {"key":…}drop instance keys (and truncated subscription payloads that never include the inner TypeError) so each shade scene does not spawn its own agent. A same-owner sibling alreadyfixed/recommendation/resolved_noise/ignoredfor an overlapping coarse or wrapper family is auto-closed without spawning. - Skip this package,
subscriptionsurface (platform already suppresses those events), ad-hocexecutefailures with no package owner, smoke-test fingerprints, and./record-outcomevalidation throws from sibling triage packages. - After a fingerprint is
fixedorrecommendationwith akody_agent_id, later leftover events increment the count but do not re-queue a new agent. Leftover runs that started beforecompleted_atalso stay closed. - A same-owner sibling that already finished
fixed/recommendationfor the same coarse family is auto-closed asresolved_noise(no spawn). - Agents that die without
record-outcomeare markedfailedafter the 2h stale-spawn window so they cannot hold the queue forever. - Max 3 agents per clock hour. More than 15 new fingerprints or 80 raw events in an hour trips the anomaly breaker (Discord alert, no more spawns that hour).
- Global lease: at most one in-flight agent. Further fingerprints wait.
- Kill switch in
packageStorage()(config.enabled)../pause/./resume. - Agents must not treat this package's own PRs/publishes as new issues.
- Before spawn, sweep lists matching Cloud agents, related open PRs, and
owner-package activity. A LIVE sibling for the same family stays queued
instead of starting a second agent. The spawn prompt includes the loop
guard (
get-issue-state+ matching open runs) and that peer snapshot so the agent does not spend its first turn repeating those calls. Names and titles stay untrusted.
Flow
- A failed job / workflow / package export emits
run.error.recorded. ./on-run-errorfingerprints and upserts a row (milliseconds).sweep(15m, or invoke./sweep) claims the oldest queued fingerprint, gathers peer agents / related PRs / owner-package activity, posts Discord, and spawns one grok-4.6 agent onkentcdodds/use-kody.- That agent classifies package vs Kody vs noise. Package fixes
use clone-edit-publish. Kody issues call
./escalate-to-kody, which spawns one grok-4.6 agent onkentcdodds/kodyto fix if obvious or recommend (Discord to Kent) if not. ./record-outcomeedits the Discord status message. Arecommendationalso posts a new Discord message so Kent is notified.
Community icon
community-icon.png is the official Kody Community Project mark from
docs/use/assets/kody-community-project-mark.png
in the kody repository, with a bug on
Kody's head and Kody looking irritated at it. The canvas outside the badge
is transparent.
Kody is a character and brand belonging to Kent C. Dodds. This package is community-built and is not affiliated with or endorsed by the official Kody project.
Exports
.— package overview./on-run-error— subscription handler./sweep— spawn path (dryRunsupported)./get-issue-state— loop guard for agents (includes a fresh peer snapshot)./peer-context— refresh matching agents, related PRs, and owner activity./escalate-to-kody— spawn one Kody-repo agent for platform issues./record-outcome— final report./pause/./resume/./status— operator controls
Report this listing
Log in to report this listing.