/install-tend:debug-tend-runfrom install-tend
Downloads and parses session-log artifacts from tend CI runs to investigate what happened during a GitHub Actions workflow. Supports Claude and Codex harnesses.
Ships in install-tend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
If the user provides a run ID or URL, extract the numeric run ID. Otherwise, list recent tend runs:
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:
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)"'
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)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-
find "$DEST" -name '*.jsonl' -not -path '*/subagents/*'
FILE=<the session's .jsonl from that listing>
The download puts each artifact in its own directory, so a matrix run (a
triage batch) lists one session per job; pick the job you are debugging.
Claude artifacts hold one <session-id>.jsonl per agent session, beside a
<session-id>/subagents/ directory with one transcript per Task subagent;
the find above leaves those out, so open one only to follow a subagent's
work. 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:
gh run view "$RUN_ID" -R "$REPO" --log-failed
The JSONL schema differs by harness. Open the reference matching the artifact name and follow its recipes:
claude-session-logs* → references/claude-logs.mdcodex-session-logs-* → references/codex-logs.mdEach 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.
After extracting the session trace, reconstruct the decision chain:
Common failure modes:
SKILL.md path in the matching harness logFor review runs, compare the bot's actions against the PR timeline:
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub max-sixty/tend --plugin install-tend2 skills in this plugin
Other plugins' skills for the same job