staticflow-kiro-log-diagnoser
StaticFlow Kiro Log Diagnoser
Overview
Use this skill when someone asks you to troubleshoot current StaticFlow Kiro failures. This skill is only for Kiro upstream errors. Ignore unrelated backend noise, including non-Kiro gateway failures.
Scope
Focus only on these StaticFlow log errors under ~/rust_pro/static_flow/tmp/staticflow-backend.log:
kiro public request failed while calling upstreamfailed to read kiro upstream event stream
If the error is not a Kiro upstream failure, say it is out of scope for this skill and stop.
Required Evidence
Do not guess from one log line alone. Always collect both:
- the actual Kiro error line from
staticflow-backend.log - the matching
llm_gateway_usage_eventsrow from StaticFlow's LanceDB viasf-cli
Use:
python3 skills/staticflow-kiro-log-diagnoser/inspect_kiro_errors.py list --limit 20
Then query the matching usage event:
python3 skills/staticflow-kiro-log-diagnoser/inspect_kiro_errors.py usage \
--timestamp 2026-04-05T10:37:17.913736Z \
--status 502 \
--key-name admin
or:
python3 skills/staticflow-kiro-log-diagnoser/inspect_kiro_errors.py usage \
--timestamp 2026-04-05T14:43:20.119261Z \
--status 599 \
--key-name for-external
Diagnosis Rules
1. kiro public request failed while calling upstream
Treat this as a malformed request class if the upstream error is:
400 Bad RequestImproperly formed request
For this class, inspect nearby log lines for:
request_validation_enablednormalized_tool_description_countempty_tool_descriptionfill_tool_description
The default high-confidence explanation is:
- local Kiro request normalization or validation did not catch malformed tool metadata before the upstream call
- the most likely cause is an empty tool description escaping local normalization
anyOfalone is not the main cause unless you find stronger evidence
When you explain this class, ground it with:
backend/src/kiro_gateway/anthropic/mod.rsbackend/src/kiro_gateway/anthropic/converter.rsdocs/superpowers/specs/2026-04-05-kiro-tool-validation-design.md
2. failed to read kiro upstream event stream
Treat this as a streaming timeout class if you see:
is_timeout=trueis_connect=false- usage event
status_code=599 - latency near
720000ms
The default high-confidence explanation is:
- the upstream request was accepted and started streaming
- reading the response body later timed out or stalled midstream
- this is not the same failure class as a malformed request
When you explain this class, ground it with:
backend/src/kiro_gateway/anthropic/mod.rsbackend/src/kiro_gateway/provider.rs
Working Commands
Show the last Kiro upstream error lines:
python3 skills/staticflow-kiro-log-diagnoser/inspect_kiro_errors.py list --limit 20
Show a small log window around one line number:
sed -n '5373,5379p' ~/rust_pro/static_flow/tmp/staticflow-backend.log
Read the Kiro tool validation design:
sed -n '1,160p' ~/rust_pro/static_flow/docs/superpowers/specs/2026-04-05-kiro-tool-validation-design.md
Output Contract
Your final answer should include:
- which Kiro error class it is
- the exact evidence from log lines
- the matching usage event evidence from
sf-cli - the most likely real cause
- whether the failure is a deterministic local malformed request or an upstream streaming timeout
Do not mix in unrelated Codex/OpenAI/other gateway errors.
More from acking-you/codex-bridge
reply-current
Use when a Codex turn running inside codex-bridge must send normal results back to the active QQ conversation as text, image, or file
1gpt2api-image-generator
Use when a QQ user asks Codex to draw, paint, create, generate, or render an image through GPT2API, including Chinese requests such as 画图, 画一张, 生成图片, 出图, 做张图, or 帮我画
1invoke-capability
Call another registered model (Claude via Kiro, Gemini images, ...) to produce this turn's reply, keeping Codex as the harness but letting a better-suited model own the actual voice. Use liberally for conversational / emotional / creative turns; Codex's own voice is a poor fit for most QQ chat.
1qq-current-history
Query normalized QQ message history for the current conversation only, with optional time, sender, keyword, and free-form filters
1qq-quoted-image-recovery
Use when a quoted QQ message likely contained an image or screenshot but the bridge only exposed a quote marker or flattened text
1