NetFabric/NetFabric.Numerics / .agents/skills/agent-harness-logs
agent-harness-logs
VerifiedFind, inspect, query, redact, and troubleshoot logs, transcripts, sessions, and OpenTelemetry data from coding-agent harnesses on Windows, macOS, Linux, and WSL. USE FOR: GitHub Copilot in VS Code; Copilot CLI; Claude Code; OpenAI Codex; Gemini CLI; OpenCode; Cursor, Windsurf, Kiro, or other VS Code-family editors; locating log files; diagnosing tool or model failures; correlating turns, subagents, and tool calls; querying JSONL, plaintext, or SQLite without spending model tokens; preparing sanitized diagnostics. DO NOT USE FOR: application logs unrelated to coding agents; uploading raw logs; treating unstable transcript schemas as public APIs.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.5 KB |
| references/codex-gemini-opencode.md | markdown | 3.2 KB |
| references/concepts-and-safety.md | markdown | 2.5 KB |
| references/copilot-and-claude.md | markdown | 2.8 KB |
| references/path-matrix.md | markdown | 3.2 KB |
| references/query-recipes.md | markdown | 2.9 KB |
| references/sources.md | markdown | 2.0 KB |
| references/vscode-and-editors.md | markdown | 2.4 KB |
| scripts/harness_logs.py | script | 10.3 KB |
| scripts/test_harness_logs.py | script | 4.5 KB |
references/copilot-and-claude.md
View on GitHub# Copilot CLI and Claude Code
## GitHub Copilot CLI
| Surface | How to use it |
| --- | --- |
| Process logs | Inspect `$COPILOT_HOME/logs/`; `COPILOT_HOME` defaults to `~/.copilot` in current versions |
| Sessions | Inspect `$COPILOT_HOME/session-state/`; older versions may use `history-session-state/` |
| Diagnostics | Run `/diagnose` in the CLI and review the generated collection before sharing |
| Log verbosity | Use the current CLI's `log_level`/`logLevel` setting; confirm accepted values for the installed version |
| Telemetry | Current releases support OTEL aligned with GenAI semantic conventions; confirm exporter settings against the installed release/docs |
The CLI prunes old process logs in current releases. Session state and operational logs answer different questions. Search sessions by ID and modification time; search process logs by timestamp, severity, request ID, model, and tool name.
Version caveat: `--config-dir` existed in earlier releases and migrated toward `COPILOT_HOME`. Record `copilot --version` before applying a path rule.
## Claude Code
| Surface | How to use it |
| --- | --- |
| Debug mode | `claude --debug` or category filters such as `claude --debug='mcp,startup'` |
| Explicit debug file | `claude --debug-file /path/to/claude-debug.log` |
| Debug directory override | `CLAUDE_CODE_DEBUG_LOGS_DIR`; `--debug-file` takes precedence |
| Transcripts | `~/.claude/projects/*/*.jsonl` |
| Background sessions | `claude logs <id>` |
| Read-only health check | `claude doctor`; use `/doctor` inside an interactive session |
| Remove local project state | Preview with `claude project purge <path> --dry-run` before any deletion |
Transcript entries are internal and can change. Claude's documented OTEL event fields may correlate to transcript data, but such joins are version-specific.
### Claude OpenTelemetry
Enable with `CLAUDE_CODE_ENABLE_TELEMETRY=1`. Choose `OTEL_METRICS_EXPORTER` and/or `OTEL_LOGS_EXPORTER`; configure standard `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT`, and headers. Tracing is beta and additionally requires `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1` plus `OTEL_TRACES_EXPORTER`.
Useful stable event families include `claude_code.user_prompt`, `assistant_response`, `tool_result`, `tool_decision`, `api_request`, `api_error`, `mcp_server_connection`, and `compaction`. Correlate with `session.id`, `prompt.id`, `message.uuid`, `request_id`, `client_request_id`, and `tool_use_id` when present.
Content is mostly gated off by default. Treat these flags as explicit sensitivity escalations:
- `OTEL_LOG_USER_PROMPTS=1`
- `OTEL_LOG_ASSISTANT_RESPONSES=1`
- `OTEL_LOG_TOOL_DETAILS=1`
- `OTEL_LOG_TOOL_CONTENT=1`
- `OTEL_LOG_RAW_API_BODIES=1` or `file:<dir>`
Raw body files contain conversation history and tool results. Heap snapshots can contain conversations and credentials. Never attach either to a public report.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |