debug-tend-run
/debug-tend-run
Debugs a tend CI run from its session-log artifacts. Use for run IDs, PR numbers, or questions about what tend did and why.
- Author
- max-sixty ↗
- Repository
- tend ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Debugs a tend CI run from its session-log artifacts. Use for run IDs, PR numbers, or questions about what tend did and why.
Original author description
Debugs a tend CI run from its session-log artifacts. Use for run IDs, PR numbers, or questions about what tend did and why.
How it works
- Identify the run
- Download session logs
- Parse session logs
- Diagnose the problem
- Cross-reference with PR state
SKILL.md preview
---
name: debug-tend-run
description: Debugs a tend CI run from its session-log artifacts. Use for run IDs, PR numbers, or questions about what tend did and why.
---
# Debug Tend Run
Investigate what tend did during a GitHub Actions run by downloading and
parsing its session log artifacts. Works for both supported harnesses
(Claude and Codex); the artifact name distinguishes them.
## Identify the run
If the user provides a run ID or URL, extract the numeric run ID. Otherwise,
list recent tend runs:
```bash
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
gh run list -R "$REPO" --limit 20 \
--json databaseId,workflowName,conclusion,createdAt,headBranch,event \
--jq '.[] | select(.workflowName | startswith("tend-")) |
"\(.databaseId)\t\(.conclusion)\t\(.createdAt)\t\(.workflowName)\t\(.headBranch)\t\(.event)"'
```
Narrow by branch (`--branch`), event type, or workflow name as needed. To find
the run associated with a specific PR:
```bash
PR_NUMBER=<number>
HEAD=$(gh pr view "$PR_NUMBER" -R "$REPO" --json headRefName --jq '.headRefName')
gh run list -R "$REPO" --branch "$HEAD" --limit 10 \
--json databaseId,workflowName,conclusion,createdAt,event \
--jq '.[] | select(.workflowName | startswith("tend-")) |
"\(.databaseId)\t\(.conclusion)\t\(.workflowName)\t\(.event)"'
```
## Download session logs
The artifact name identifies the harness:
- `claude-session-logs*` — Claude harness (headless `claude -p` behind the proxy)
- `codex-session-logs-*` — Codex harness (`max-sixty/tend/codex`)
```bash
RUN_ID=<run-id>
DEST=${TMPDIR:-/tmp}/session-logs/$RUN_ID
gh run download "$RUN_ID" -R "$REPO" --pattern '*session-logs*' --dir "$DEST"
ls "$DEST" # confirm claude- or codex-
FILE=$(find "$DEST" -name '*.jsonl' | head -1)
echo "$FILE"
```
Claude artifacts hold flat JSONL files, one per agent session. Codex
artifacts store the rollout at `sessions/YYYY/MM/DD/rollout-*.jsonl`
plus `projects/token-usage.json`; one rollout per session.
If no artifacts exist, the run either had no agent session or ended before
logs were uploaded. Fall back to console output:
```bash
gh run view "$RUN_ID" -R "$REPO" --log-failed
```
## Parse session logs
The JSONL schema differs by harness. Open the reference matching the
artifact name and follow its recipes:
- `claude-session-logs*` → [`references/claude-logs.md`](references/claude-logs.md)
- `codex-session-logs-*` → [`references/codex-logs.md`](references/codex-logs.md)
Each reference covers the line schema plus copy-paste jq for an overview
trace, targeted queries (commands, tool results, files, gh calls), and
keyword search. Both assume `$FILE` from the download step.
## Diagnose the problem
After extracting the session trace, reconstruct the decision chain:
1. **What triggered the run?** Check the event type and triggering context
(PR comment, push, schedule).
2. **What did the bot see?** Look at system/user messages and tool results.
3. **What did it decide?** Follow assistant/agent text for reasoning.
4. **Where did it go wrong?** Compare intended behavior against actual tool
calls and outputs.
Common failure modes:
- **Wrong skill loaded** (or skill not loaded) — inspect skill invocations or
reads of a `SKILL.md` path in the matching harness log
- **Stale context** — bot acted on outdated PR state or missed recent commits
- **Tool error ignored** — a command failed but the bot continued
- **Hallucinated file/function** — bot referenced something that doesn't exist
- **CI polling timeout** — bot ran out of time waiting for checks
## Cross-reference with PR state
For review runs, compare the bot's actions against the PR timeline:
```bash
PR_NUMBER=<number>
gh pr view "$PR_NUMBER" -R "$REPO" --json title,state,reviews,comments,commits \
--jq '{title, state, reviews: [.reviews[] | {author: .author.login, state: .state}],
comments: (.comments | length), commits: (.commits | length)}'
```
Check whether subsequent commits undid something the bot approved, or whether
human reviewers flagged issues the bot missed.
Files in this package (3)
- SKILL.md 4 KB
- references/claude-logs.md 2 KB
- references/codex-logs.md 5 KB
Versions
The database has no other skills named debug-tend-run.
Database snapshot: 13.11.2026 · package version e822d998f483 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 85running-tend
numbagg-specific guidance for tend CI workflows. Adds a standing exception for filing issues in other repos, which CI workflow to watch, the command timeout the long benchmark job needs when polling CI, nightly-survey expectations, and dependency management on top of the bundled… - 100running-tend
Worktrunk-specific guidance for tend CI workflows. Adds codecov polling, Rust test commands, labels, and review criteria on top of the bundled tend-ci-runner skills. Use when operating in CI. - 100lz-tend
Tend one class of queued weeds - find the root cause, add the strongest check that rejects the class, prove it fails on a real weed, then fix or baseline every instance, in a bed branch beside the repository for a human to land. Use for "tend <class>", "pull these weeds", "make… - 100gardener
Tend the brain's knowledge as the orchestrator for the gardener family. With no folder, drain the capture inbox, mine pending session transcripts, and reconcile Obsidian task notes against merged pull requests and recent sessions. With a folder, run inbox, transcript, audit, and… - 100release
Tend release workflow. Use when user asks to "do a release", "release a new version", "cut a release", or wants to publish a new version to PyPI. - 100tend
Tend the Allium garden. Use when the user wants to write, edit, update, add to, improve, clarify, refine, restructure, fix or migrate Allium specs. Covers adding entities, rules, triggers, surfaces and contracts, fixing syntax or validation errors, renaming or refactoring within…