agentleFS
onelastcommitonelastcommit/noctra/.claude/skills/troubleshooting/SKILL.md

troubleshooting

Skill4 starsChanged 29 days agoMITView on GitHub

Use when Noctra fails to pick up tickets, run an agent, create PRs, pass review, iterate on feedback, or when logs/worktrees/branches need diagnosis or cleanup.

  • Reads credentials
  • Sends data out
  • Commits and pushes

26 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use task-breakdown.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ttmouseSkill

    task-breakdown

    专业的任务拆解器,将复杂需求拆分成"独立可运行与可演示"的最小闭环任务卡。严格按照纵向切片、单一数据变化、单一入口原则,确保每张任务卡都能在单回合实现并验证。当用户说"帮我拆解一下任务"、"用任务拆解器分析"、"按规范拆分"或需要将一个大的开发需求拆分成可执行的小任务时使用。输出格式严格按照[src/renderer/TODO.md]标准存储。

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this runbook when Noctra behaves unexpectedly.

    line 8
  2. Very specific:

    Run noctra doctor from the same host and config context as the service.

    line 12
  3. Distinctive:

    Check the startup banner in service logs.

    line 13
  4. Distinctive:

    Check the trigger mode first:

    line 26
  5. Very specific:

    If the agent changed irrelevant files, improve the ticket with the writing-good-tickets skill and requeue it with specific files, errors, …

    line 70
  6. Distinctive:

    Check the selected backend:

    line 74
  7. Distinctive:

    If every review errors or fails before useful comments appear:

    line 116
  8. Very specific:

    Check Noctra's service log (noctra logs) for the gemini review lines.

    line 120
  9. Distinctive:

    If the diff is huge, split the ticket or reduce scope.

    line 121
  10. Distinctive:

    Check GitHub auth and repo write access:

    line 134
  11. Distinctive:

    Delete a stale remote branch if a prior run left one behind:

    line 146
  12. Very specific:

    Check the ticket log for the exact gh pr create error.

    line 152
  13. Very specific:

    Delete the old clone (find it with noctra repos list).

    line 174
  14. Distinctive:

    Prefer the built-in cleanup command:

    line 181

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Troubleshooting Noctra

Use this runbook when Noctra behaves unexpectedly. Prefer noctra doctor, service logs, and per-ticket agent logs before changing code.

First Checks

  1. Run noctra doctor from the same host and config context as the service.
  2. Check the startup banner in service logs; it prints the resolved backend, trigger mode, states or label, repo routing, review gate, auto-iterate, and notifications.
  3. Inspect the per-ticket transcript under the configured log directory:
make tail TICKET=ENG-42
# or
tail -f logs/ENG-42.log

Config defaults to ~/.noctra/ for .env and logs/, but a checkout containing .env, .env.example, or go.mod uses the current directory.

Tickets Are Not Picked Up

Check the trigger mode first:

TRIGGER_MODE=state
TRIGGER_STATE=Next
IN_REVIEW_STATE=In Review

or:

TRIGGER_MODE=label
TRIGGER_LABEL=noctra
IN_REVIEW_STATE=In Review

Then verify:

  1. LINEAR_TEAM_KEY matches the ticket prefix, such as ENG for ENG-42.
  2. State and label names match Linear exactly; names are case-sensitive.
  3. The Linear API key has workspace access to read issues and write comments/state changes.
  4. The ticket's Linear project has a Repo: directive in its description, or REPO_PATH is set as a fallback.

Query Linear states directly when names are unclear:

curl -s -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $LINEAR_API_KEY" \
  --data '{"query":"{ team(key: \"ENG\") { states { nodes { name } } } }"}' \
  https://api.linear.app/graphql | jq '.data.team.states.nodes[].name'

Wrong Repo Or No Changes

Noctra routes each ticket to the repo named in its Linear project's Repo: directive. Confirm the project description (or content body) contains a line like:

Repo: your-org/web-app
Branch: main

owner/name expands to a GitHub HTTPS URL; full https:// / git@ URLs work verbatim. Branch: is optional (defaults to the repo's default branch). If the directive is missing, Noctra falls back to REPO_PATH when present. If neither exists, it skips the ticket with a Linear comment.

If the agent changed irrelevant files, improve the ticket with the writing-good-tickets skill and requeue it with specific files, errors, and acceptance criteria.

Agent Does Not Start

Check the selected backend:

grep '^AGENT_BACKEND=' .env

For Claude:

claude --version
claude

For Codex:

codex --version
codex login

A run that fails because the agent CLI isn't logged in doesn't use up a retry: Noctra comments 🔑, holds the ticket, and waits. Log in, then /requeue <ticket> (or Retry on the dashboard). Requeueing also resets a ticket's retry count, so a ticket that hit MAX_RETRIES can run again without restarting Noctra.

Noctra inherits CLI auth from the host unless API keys are supplied. In containers, use API-key auth instead of interactive login:

ANTHROPIC_API_KEY=...
OPENAI_API_KEY=...

Agent Teams Is Not Active

Agent Teams is Claude-only. Verify:

AGENT_BACKEND=claude
USE_AGENT_TEAMS=true

The value must be true (or 1/yes, any case). Check the ticket log for the backend run header and use a recent claude CLI.

Gemini Review Fails Or Seems Wrong

If every review errors or fails before useful comments appear:

  1. Confirm GEMINI_API_KEY is set only when the review gate is desired.
  2. Validate the key with a direct API call.
  3. Check Noctra's service log (noctra logs) for the gemini review lines; there is no separate Gemini log file.
  4. If the diff is huge, split the ticket or reduce scope.
curl -s \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent?key=$GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Say hello"}]}]}' | jq .

Gemini returning PASS on weak work usually means the review prompt or ticket acceptance criteria are too broad. Tighten the ticket and consider increasing MAX_REVIEW_RETRIES.

PR Creation Fails

Check GitHub auth and repo write access:

gh auth status
git ls-remote origin

For HTTPS remotes in containers, provide GH_TOKEN; the entrypoint wires it into gh and git.

Common fixes:

  1. Log in as the GitHub account with repo write access.
  2. Delete a stale remote branch if a prior run left one behind:
git push origin --delete noctra/eng-42
  1. Check the ticket log for the exact gh pr create error.

Auto-Iterate Does Not React

Verify:

AUTO_ITERATE_PRS=true
MAX_PR_ITERATIONS=3
PR_POLL_INTERVAL=120
TRUSTED_REVIEWERS=

Noctra only watches PRs it authored, identified by the noctra/<id> branch prefix plus the Noctra marker in the PR body. It ignores bot feedback unless the bot login is in TRUSTED_REVIEWERS. CI failures are keyed by head commit SHA and are acted on once per failing commit.

The restart-safe cursor is stored in the SQLite DB at ~/.noctra/state.db unless STATE_DB overrides it. Deeper behaviour is in the auto-iterate skill.

A Repository Was Transferred Or Renamed

Symptom: a daily 🔑 Repositories alert, or github: skipping repo / lessons: failed to get PR details with not_installed, naming the old owner/name. Noctra cannot follow the move by itself, because the token service won't mint a token for the old name, and for a private repository GitHub only returns the redirect to a caller that already has access. With Noctra stopped (noctra stop):

  1. Point the Linear project's Repo: line at the new name.
  2. Delete the old clone (find it with noctra repos list). It holds nothing that isn't on GitHub, and Noctra re-clones from the directive when a ticket needs it.
  3. Back up state.db, then rewrite the old URLs in pr_states.pr_url and the repo_lessons.repo slugs (<owner>-<name>, lower case). An open PR left under its old URL is never watched again. If the new URL already has a row, delete the old one instead of renaming it.

Then noctra start.

Cleanup After A Crash Or Bad Run

Prefer the built-in cleanup command:

./noctra cleanup
./noctra cleanup --force

Manual cleanup, when needed:

cd /path/to/repo
git worktree remove --force ~/.noctra-worktrees/ENG-42
git worktree prune
git branch -D noctra/eng-42 2>/dev/null || true
git push origin --delete noctra/eng-42

Move the Linear ticket back to the trigger state, or requeue it from Telegram:

/requeue ENG-42 More context for the next attempt.

Useful Logs

make logs                    # systemd service log
make watch                   # most recent agent transcript
make tail TICKET=ENG-42      # one ticket transcript
ls -lt logs/*.log | head     # recent local checkout logs

Noctra has no inbound server, webhook, ngrok tunnel, or port requirement. It polls Linear and GitHub over outbound HTTPS.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.