본문으로 건너뛰기
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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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월 16일 업데이트

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월 16일 업데이트

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월 16일 업데이트

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월 16일 업데이트

Auto-search and summarize latest AI/agent papers.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mangowhoiscloud/geode152026년 10월 16일 업데이트

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월 16일 업데이트

mangowhoiscloud의 스킬 모두 보기

이 스킬의 문제 신고