Cross-owner reusable calls left XAI_API_KEY empty in the runner while
OLLAMA_CLOUD_API_KEY worked. Declare secrets on workflow_call, accept
alternate secret names, log key lengths (not values), and ship an
ai-agent.yml caller template with an explicit secrets map.
Keep ollama-cloud/* as primary. Each agent may declare fallback in
agents.json (xai-oc/grok-*). On quota/auth/provider failure, run-agent
switches once to the fallback and continues retries.
- agents.json: fallback fields for pm/junior/senior/qa/intern
- route.sh: emit fallback to GITHUB_OUTPUT
- agent.yml: pass FALLBACK env into run-agent
- install-opencode.sh: register primary+fallback models in provider maps
- run-agent.sh: failover on quota/credit/429/capacity-class errors
Ollama Cloud usage is at 100% so ollama-cloud/* agents fail. Move
pm, junior, senior, qa to xai-oc (grok-4.5 / grok-4.3). leave intern on
local ollama/ornith:35b; lead/ops already on xAI.
Add 'hermes' to the trusted issue creators and comment authors in the
workflow gate so the Hermes Agent can create issues and comment with
@mentions to trigger the AI agent pipeline.
opencode ships a built-in `xai` model-catalog entry (a real @ai-sdk/xai
integration with Responses-API support). Naming our custom OpenAI-compatible
shim `xai` too made opencode's --auto permission-check path assume the
catalog's provider object once a `permission` block is present (always, in
this pipeline) and call .responses(), which our shim doesn't implement —
crashing every @lead/@ops run with "Z.responses is not a function".
Reproduced locally with the production config shape on opencode 1.17.13;
renaming the provider key to xai-oc (model id xai-oc/grok-4.5) fixes it
reliably across repeated fresh-state runs.
PR #114 pointed @lead/@ops at xai/grok-4.5 but never gave opencode a
provider config for it — xai is not a built-in like anthropic was, it
needs the same explicit OpenAI-compatible block as ollama/ollama-cloud
(confirmed by the prior, never-merged investigation in PR #110). Without
this, any @lead/@ops run fails immediately on an unresolvable provider.
Adds the xai provider block (baseURL https://api.x.ai/v1, models derived
from agents.json) and passes XAI_API_KEY into the Install-opencode step
(it was already added to the Run-agent step in #114).
Removes the last Anthropic-model usage from the agent registry.
XAI_API_KEY was already provisioned as an org secret; wire it into
the run-agent step and update every doc/comment that referenced
ANTHROPIC_API_KEY or claude-opus-4-8.
Mentioning a dev agent no longer spawns a branch + PR machinery. It is a
CONVERSATION by default: the dev reads what it needs and replies in-thread.
- route.sh: workmode=build|discuss for mode=pr agents. Build ONLY on the
explicit signals: PR-thread comments (resume), the pm delegation template
("please proceed with issue …" — a human can write it too), or the qa bounce
("please address my review …"). Everything else = discuss: no branch prep,
no "🔨 Building" notice.
- run-agent.sh: discussion ACTION for devs (read-only consult, no edits/
commits/markers). @pm gains 'ASK: @<dev> <question>' to consult devs before
planning — gather feasibility/effort input, then DELEGATE when enough is
known. One ASK per reply; never ASK+DELEGATE together.
- publish.sh: pm ASK handler posts the question as a discussion trigger; dev
discuss path posts the reply (+run report) and skips ALL git/PR machinery
(stray edits discarded). ASK marker stripped from visible replies.
- agent.yml: WORKMODE threaded to Run-agent + Publish. README documents it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- publish.sh: resolve_prs matches ai/issue-N AND ai/issue-N-<slug> split branches
(exact-only silently stalled DELEGATE:@qa and autopilot MERGE_PR on slugged
work); qa hand-off lists all open PRs; autopilot refuses to merge multi-PR
issues (drops the label, hands to the human) — merging one of several open
PRs is half a change deployed. Retro's state=all resolve matches slugs too.
- fetch-thread.sh: paginate and keep the NEWEST 100 comments — a bare limit=100
kept the OLDEST page and dropped recent decisions on long threads.
- route.sh: word-boundary mention matching ("@internal" no longer routes to
@intern); a comment with no real agent mention now SKIPS gracefully
(mode=skip outputs + step guards in agent.yml) instead of a red run.
- run-agent.sh: LEARNINGS.md cap is line-aware and keeps the NEWEST entries
(retros append at the bottom; the old head -c cut the latest lessons first).
- agents.json/README: @pm gemma4 -> minimax-m3 — the retro rule demands an
investigating PM, and gemma4 posted 0 tool calls on every run; minimax is the
model @qa demonstrably uses tools with.
- agent.yml: document the PR-thread concurrency-group caveat.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A stalled local-ollama generate on a trivial @intern question held the single
runner slot for ~1h, queueing every agent run instance-wide (homelab run 869).
- run-agent.sh: each opencode attempt wrapped in `timeout -k 30 $AGENT_TIMEOUT`
(default 1200s). rc=124 is not retried — a hung backend stays hung; fail fast
and free the runner.
- agent.yml: job-level timeout-minutes: 45 as backstop.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TOKEN_OPS re-minted with write:package (was 403 on package endpoints despite ops
being site admin — token scopes gate admins too). Document package↔repo linking
and the registry auth constraints in the skill.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dropdown summary carried dynamic numbers, so every comment's collapsed line
looked different. Now the label is literally 'details' everywhere; the headline
numbers moved to the first body line.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comments looked different depending on the run: tool-using agents got a
collapsed <details> report while text-only replies got a bare one-line <sub>
footer. Every comment now gets the SAME dropdown — summary '🔧 N tool calls ·
in X · out Y · <cost>', body = the tool list (or '(no tool calls)') plus the
full token/cost breakdown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seen on issue #83: qa's approval pasted whitespace-nit detail into the issue
thread. The issue is for the creator/orchestration; review internals belong on
the PR. On APPROVE the full reply (+run report) now posts to the PR and the
issue gets exactly '✅ Reviewed PR #N — looks good.' (falls back to the issue
only if no PR could be resolved).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New learning step: ask @pm for a retrospective on any issue and the system
turns what happened into prompt-visible rules for future runs.
- run-agent.sh: @pm gains a RETRO marker (emit only when the maintainer asks);
LEARNINGS.md (caller repo root, capped at 4KB) is injected into EVERY agent's
prompt as "TEAM LEARNINGS" — the feedback loop that makes delegation more
robust over time.
- publish.sh: on @pm's RETRO marker, open a "retro: issue #N" issue pointing at
the issue + its PR (state=all resolve, works after merge) and trigger @senior
on it (has gitea-api to read both threads). The retro produces a LEARNINGS.md
PR through the NORMAL choreography (senior → pm → qa), so retros are reviewed
like any change. Strip the RETRO marker from visible replies.
- publish.sh: bounce counter now counts only @qa-authored comments matching the
exact trigger template — on PR #84 it jumped 1/3 → 3/3 because a qa review
QUOTED our own "(fix attempt …)" template from the diff, halving the fix
budget. Template + regex pinned together with a sync note.
- README: document the retro loop.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The fixed trigger templates referred to their own author in the third person —
e.g. @qa posting 'please address @qa's review above' (seen on PR #80) or a dev
posting 'the dev has pushed an update'. Reworded to first person ('my review',
'I have pushed', 'per my plan'), which also makes routing order-independent:
each trigger now mentions ONLY its target agent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>