本文へ移動
cccskills
無料GitHub で公開

agent-ops-debugging

Diagnose agent operational failures through default-policy checks, multi-gap analysis, explicit service ownership, request-context lifetime, and degradation-versus-correctness checks.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md8.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Ops Debugging — Autonomous Agent Operational Debugging Patterns

Source: Distilled from GEODE operational debugging sessions (2026-03-14) Philosophy: "Not crashing" and "working correctly" are different problems. Historical incident: ADR-008. The referenced Blog 25 (25-operational-debugging-four-layer-fix.md) is absent from this checkout; it is retained here only as historical provenance. Current contract: construction and lifecycle.

5 Pattern Overview

#PatternOne-line PrincipleApplicable Layer
D1Safe Default Anti-patternSafe defaults guarantee stability but not correctnessAll layers
D2Multi-gap Root CauseIndividual gaps are harmless but N gaps combined manifest — individual tests cannot catch themPipeline
D3Ownership and Context LifetimeCompose services explicitly; bind and reset request-local contextWiring + Runtime
D4Execution BoundaryChoose explicit snapshots or context propagation according to ownershipRuntime + Concurrency
D5Degradation ≠ CorrectnessGraceful skip/fallback and functional correctness must be verified separatelyVerification

D1. Safe Default Anti-pattern

Principle

When defaults are set to safe values like True, None, or "", the system does not crash but returns results different from the intended behavior. This type of bug does not appear in error logs, so it is discovered late.

Diagnostic Criteria

Q: If this code path operates with the default value, is the result "normal" or "degraded"?
Default TypeNormal CaseDegraded Case
dry_run=TrueReturns fixture when no API keyReturns only fixture even with API key present
return NoneOptional feature not in useRequired feature silently disabled
log.debug(skip)Optional external integration skippedRequired integration silent fail

Application Pattern

# BAD — always safe but always degraded
dry_run = args.get("dry_run", True)

# GOOD — default determined by system state
dry_run = args.get("dry_run", force_dry_run)  # force_dry_run is readiness-based

Use the owner's declared default and distinguish normal, degraded, and failed outcomes. The example above describes the 2026-03-14 incident; credential availability alone does not authorize live calls or changing a dry-run request.


D2. Multi-gap Root Cause Analysis

Principle

The most difficult operational bugs to find are those that manifest only when N independent gaps exist simultaneously. Each gap is individually harmless or has separate safeguards, so they are not discovered by unit tests.

Analysis Framework

1. Symptom definition: "On which path, under which conditions, does the result differ from expectations"
2. Path comparison: "Identify divergence points compared to the normally working path"
3. Gap enumeration: "Verify whether each divergence point has an independent gap"
4. Overlap determination: "Must all gaps exist simultaneously for the bug to manifest?"

Case: Sub-agent dry-run (3-gap)

Gap 1: Handler default = True (hardcoded)
  → Alone: Solvable if LLM passes dry_run=False
Gap 2: dry_run not defined in tool schema
  → Alone: LLM cannot know the parameter
Gap 3: ContextVar thread isolation
  → Alone: Handler cannot query readiness

All 3 present → sub-agent path always runs in dry-run

Fix the smallest root cause, then verify whether the remaining gaps are actually harmless. Do not close them from the existence of one fix alone.


D3. Service Ownership and Request Context

Principle

Current GEODE composes services in core.wiring through constructors or existing typed contexts. Do not restore the historical ContextVar service locator. ContextVars may hold request identity, diagnostics, or request-local state; their binding and reset must match the logical request lifetime.

Entry Point Checklist

Typical entry points for an agent system:
[ ] CLI single command
[ ] REPL interactive loop (e.g., `geode` → interactive)
[ ] Hosted runtime turn
[ ] Sub-agent task, worker thread, or subprocess
[ ] Server or scheduled-job entry point
[ ] Test fixture (e.g., pytest conftest.py)

For the affected entry points, trace the service constructor to its consumer and the request-context binder to its reset, including errors and cancellation. Reuse the existing composition owner; entry-point count alone does not justify another bootstrap layer or DI container.


D4. Crossing Task, Thread, and Process Boundaries

Principle

Check how the actual execution primitive propagates context. A copied context does not synchronize mutable services, and a captured value can become stale. Pass services explicitly and choose the lifetime of value snapshots deliberately.

Historical pattern — ADR-008, 2026-03-14

def make_handler(*, force_dry_run: bool = True):
    """force_dry_run is captured in the closure — same regardless of which thread executes."""
    def handler(task_type: str, args: dict) -> dict:
        dry_run = args.get("dry_run", force_dry_run)
        ...
    return handler

# Historical call site: fix readiness state at handler creation time
readiness = _get_readiness()
handler = make_handler(force_dry_run=readiness.force_dry_run)

Current decision criteria

ValueBoundary treatmentVerify
Service dependencyConstructor or existing typed contextCorrect owner and teardown
Immutable per-turn policyExplicit snapshot at the owning turn boundaryA later config change affects the intended next turn
Request identity or diagnosticsScoped binding or explicit context propagationCorrelation preserved; reset on success/error/cancel
Cross-process inputExisting serialized request contractNo assumption that in-process ContextVars cross the boundary

The historical closure fixed one readiness lookup. It is not a recommendation to capture mutable credentials or long-lived policy at handler construction.


D5. Degradation ≠ Correctness

Principle

Graceful degradation is a system stability pattern. It must be verified separately from functional correctness.

Verification Matrix

For all external dependencies:

| Dependency | Expected behavior when present | Expected behavior when absent | Actual behavior |
|------------|-------------------------------|-------------------------------|-----------------|
| Provider   | authorized call uses selected source | explicit error or explicitly requested fixture mode | ??? |
| MCP        | tool list loaded              | skip + warning                | ???             |
| Redis      | L1 cache used                 | direct L2 query               | ???             |

Test both columns with offline fakes first. Live verification requires the task's authorization; merely finding credentials does not authorize it.

Distinction Criteria

Stability test: "Does the system not crash when dependency X is absent?"
Correctness test: "Does the system actually use X when dependency X is present?"

Verify the declared outcome in both cases. A required dependency may correctly fail closed instead of returning a successful-looking fallback.


Debugging Workflow

When encountering a symptom of "it works but not correctly" during operations:

1. Symptom → Identify the affected layer (infrastructure/UI/DI/pipeline)
2. Compare with the normal path to find divergence points
3. Check defaults at divergence points — D1 Safe Default applicable?
4. Determine single cause vs Multi-gap — D2 applicable?
5. ContextVar access failure? — D3/D4 applicable?
6. After fix, verify both "when present" + "when absent" — D5

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit agent runtimes and their tests for lifecycle inference, capability overload, context pollution, correlated verification, prompt-only control, false success, dead compatibility paths, test-only seams, and complexity without contribution. Use for whole-repository agent audits, slop or dead-code triage, test contribution reviews, large refactors, tool/context simplification, and cleanup requests that need proof before deleting code or tests.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

Align, run, audit, and publish GEODE benchmark comparisons against Agent-World arXiv 2604.18292v1 across MCP-Mark, BFCL V4, and tau2-bench. Use for Agent-World or AgentWorld comparison requests, cross-suite agent benchmark design, Tau2 comparator/profile diagnosis, paired thin-runtime-versus-GEODE experiments, mean-accuracy@8 replication, or benchmark comparability and artifact reviews.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

Verification checklist to prevent fake success. Detects test deletion/disabling, coverage regression, lint bypass, secret exposure. Triggered by "deception", "fake" ("가짜"), "fake success", "verification" ("검증"), "checklist" ("체크리스트"), "deletion detection" ("삭제 탐지"), "regression" keywords.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

Auto-search and summarize latest AI/agent papers.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

Content-addressed baseline-archive epoch partitioning. Partition baseline_archive.jsonl + the self-improving hub's baseline serving by a HASH of the full baseline-production+measurement spec — when the spec (margin_rule, fitness/margin logic version, the 4 roles' model+source, rubric/dim-set, bench, seed-pool identity) changes, the hash changes → a new epoch series (like seed-gen gen-*). Triggered by "baseline epoch", "baseline 아카이빙", "epoch partition", "spec hash", "content-addressed", "margin_rule namespace", "production logic 구분", "baseline 하위 서빙" keywords.

日本語の概要は準備中です。原文の説明を表示しています。

mangowhoiscloud/geode152026年10月12日 更新

mangowhoiscloud のスキルをすべて見る

このスキルの問題を報告する