agentsight-bugfix

A five-stage workflow for fixing bugs in AgentSight: understand the report, reproduce the problem, find its cause, make a small code change, and verify the result. AgentSight is a system that observes and analyses agent activity.

In plain words
What is it for?
Investigating issues across AgentSight's probes, parser, aggregator, analyzer, generative-AI, and storage stages, then implementing and testing the smallest suitable fix.
Why use it?
It reduces guesswork by requiring evidence from a fresh reproduction before changing code and by checking each fix afterward.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alibaba/anolisa/agentsight-bugfix
Any agent
npx skills add alibaba/anolisa --skill agentsight-bugfix
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.01253
Opus 5 $0.00034 $0.00626
Sonnet 5 $0.00013 $0.00251
Haiku 4.5 $0.00007 $0.00125

Measured 2d ago against content hash f283fe52d0bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentsight-bugfix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agentsight/develop-skills/agentsight-bugfix/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AgentSight Fix Issues 流程

目标

在接到 AgentSight 的 Bug 修复任务时,严格按以下五个阶段执行,确保每轮迭代最小化改动、最大化验证。

了解问题 → 复现验证 → 根因分析 → 编码修复 → 验证修复

阶段 1:了解问题

目标:明确 Bug 的实际表现、预期行为和影响范围,在动手之前先想清楚。

  • 阅读 issue 描述或 Bug 报告,提取关键信息:
    • 实际表现:当前系统做了什么?(错误数据、缺失字段、异常行为等)
    • 预期行为:系统应该做什么?
    • 触发条件:什么场景下出现?(特定 Agent、特定 API、特定协议等)
    • 影响范围:哪些数据/功能受影响?
  • 定位相关代码模块,理解当前数据流路径(参考 docs/ARCHITECTURE.md 流水线:Probes → Parser → Aggregator → Analyzer → GenAI → Storage
  • 不要在这个阶段下结论或开始写代码,信息不充分时的判断大概率是错的

阶段产出:四要素摘要(实际表现、预期行为、触发条件、影响范围)。

阶段 2:复现验证

目标:在实际环境中从零运行一次完整流程,亲眼看到 Bug 发生。

硬性要求

  • 必须在实际环境中运行 agentsight trace,不要只看已有数据或旧 DB 就下结论
  • 必须从零开始:停掉旧进程 → 清理旧数据 → 启动 trace(开启 debug 日志)→ 触发目标场景 → 查询 DB 确认 Bug 存在
  • 收集 debug 日志,用于阶段 3 分析

阶段产出:实际观察到的现象(DB 数据、日志关键行),与阶段 1 的预期做对比。

阶段 3:根因分析

目标:基于阶段 2 收集的日志和数据,定位数据流在哪个环节断了。

原则

  • 先看日志证据,定位数据流断点,不要只凭代码推测
  • 重点关注事件处理顺序(时序问题),agentsight 事件循环是串行的
  • 验证旧代码的实际行为是否和预期一致(如 parsed_message 是否为 None、mapper 是否命中)

常见断点检查清单:

检查项 日志关键词 说明
AggregatedResult 类型 Analyzing aggregated result 是 SseComplete 还是 Http2StreamComplete?
ParsedApiMessage 是否生成 Parsed OpenAI response 没有 = analyzer 没产出 Message
response_id 是否提取 chatcmpl- 从 SSE body 或 parsed message
mapper 是否命中 ResponseSessionMapper FileWrite 时序是否先于 LLM 事件
PendingGenAI 是否入队 queued for deferred 没入队 = pending_response_id 为 None
complete_pending 是否更新 Promoted pending→complete UPDATE 是否包含 session_id

阶段产出:明确指出数据流在哪个环节断了,以及断裂的原因。

阶段 4:编码修复

目标:针对阶段 3 定位的断点,做最小范围的代码修改。

原则

  • 只改解决该问题所需的部分,无关改动不要顺手一起改
  • 修复可能涉及多个断点时,每轮只修一个

提交前必须通过本地检查:

  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test

阶段 5:验证修复

目标:构建新版本并部署到运行环境,从零验证修复有效。

  • 构建 release 版本
  • 部署到运行环境(本地直接使用,远程环境需上传部署)
  • 按阶段 2 的流程完整走一遍:清 DB → trace → 触发请求 → 查 DB,确认修复有效

验证结果处理

结果 动作
Bug 已修复,无副作用 进入完成确认
Bug 部分修复 回到阶段 3,分析剩余断点
Bug 未修复或出现新问题 回到阶段 3 重新分析,不要在同一轮叠加更多修改

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 67 tokens per session scan A f283fe52d0bd

Subscribe to this mod's changes

agentsight-bugfix is a skill published in the GitHub repository alibaba/anolisa (614 stars, last pushed 3d ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,253 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

beevibe-verify-pr

CI verification before marking a PR-bearing task done. Use BEFORE calling mcpbeevibeupdateprogress(done) on any session whose deliverable is a pull request — including the first dispatch (you opened the PR with gh pr create) and any revision dispatch (you pushed new commits to an existing PR). Watches the PR's…

beevibe-ai/beevibe · 172 tokens

beevibe-pre-task-setup

Cold-start git workspace setup for a fresh beevibe task. Use at the start of a session whose intent has a block but NO or block — i.e. the first dispatch of this task. Checks for an existing repo clone, pulls the base branch if present (clone if missing), prunes any per-task worktrees from earlier tasks whose work has…

beevibe-ai/beevibe · 198 tokens

beevibe-use-repo

You are the child agent inside a fresh Docker sandbox. Borrow the given GitHub repo, produce a real artifact for the goal, and export it. Do not review the repo. The proof is that it works.

beevibe-ai/beevibe · 50 tokens

spec-converge

Iteratively review an instar-development spec with multi-angle internal reviewers (security, scalability, adversarial, integration, decision-completeness, lessons-aware) and real cross-model external reviewers routed through the agent's own installed CLIs (codex → GPT-tier, gemini → Gemini-tier; one pass per available…

JKHeadley/instar · 135 tokens

beevibe-discover-repo

Find the best GitHub repo for a goal, then call userepo to run it in a sandbox. Use whenever the user's goal requires a capability you don't have natively and you haven't been given a specific repo.

beevibe-ai/beevibe · 51 tokens