Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
comisai avatar

Log Troubleshooting

  • 1 installs
  • 5 repo stars
  • Updated August 4, 2026
  • comisai/comis

Debugging guide for analyzing and resolving Comis log errors and system issues.

About

Provides log parsing and troubleshooting patterns for Comis system. Developers and ops use it to diagnose and fix application errors.

  • Log pattern analysis and common error resolution
  • Troubleshooting decision tree

Log Troubleshooting by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #489 of 596 Debugging skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/comisai/comis --skill log-troubleshooting

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars5
Last updatedAugust 4, 2026
Repositorycomisai/comis

What it does

Debugging guide for analyzing and resolving Comis log errors and system issues.

Files

SKILL.mdMarkdownGitHub ↗

Log Troubleshooting

You have read-only access to the daemon logs directory at ~/.comis/logs/.

This skill bundles scripts/log-digest.py -- a Python CLI that parses NDJSON logs and produces structured, context-friendly summaries. Use it as your primary analysis tool. It uses only Python 3 standard library (no pip install needed).

All script paths below are relative to this skill's directory. Resolve them against the <location> shown in the available skills listing (e.g., if the skill location is ~/.comis/skills/log-troubleshooting, then scripts/log-digest.py means ~/.comis/skills/log-troubleshooting/scripts/log-digest.py).

Quick Start

For most troubleshooting requests, start here:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log

This produces a structured summary: entry count, time range, level distribution, top modules, every error and warning as a compact one-liner, slowest operations ranked by duration, and unique error messages with counts. Read the output and report findings to the user -- this single command answers most "what's wrong?" questions.

Log Location and Rotation

FileDescription
~/.comis/logs/daemon.logActive log (current session)
~/.comis/logs/daemon.1.logMost recent rotated log
~/.comis/logs/daemon.2.log .. daemon.5.logOlder rotated logs

Rotation triggers at 10MB per file, 5 rotated files kept. Start with daemon.log (current) unless investigating a past incident.

Log Format

Each line is a single JSON object (NDJSON / Pino structured logging).

Pino level codes:

CodeNameMeaning
10TRACEFinest granularity, rarely enabled
20DEBUGInternal steps, tool calls, intermediate state
30INFOBoundary events: started, stopped, request complete
40WARNDegraded but functional
50ERRORBroken functionality
60FATALUnrecoverable, daemon cannot continue

Standard fields:

FieldTypeWhen Present
levelnumberAlways (Pino level code)
timestringAlways (ISO 8601)
modulestringAlways (agent, daemon, channels, gateway, memory, skills, scheduler, sub-agent-runner, graph-coordinator)
msgstringAlways (human-readable message)
agentIdstringAgent-scoped operations
traceIdstringRequest-scoped (auto-injected)
durationMsnumberTimed operations
toolNamestringTool execution logs
methodstringRPC/HTTP method
errobject/stringError details (Pino serialized)
hintstringActionable fix guidance (on WARN/ERROR)
errorKindstringClassification: config, auth, dependency, timeout, validation, internal
channelTypestringChannel adapter logs

Analysis Workflow

Log files can be 10MB with 10K+ lines -- reading one raw would flood your context window and waste tokens without helping the user. The digest script solves this by parsing the JSON server-side and returning only the structured summary, so you get the full picture in a few dozen lines. Start broad with the script, then narrow with filters or grep.

Stage 1 -- Get the overview

Run the digest script with no filters to understand the full picture:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log

The output includes:

  • Total entry count and time range
  • Level distribution (how many errors vs info vs debug)
  • Top modules by log volume
  • Every error and warning with compact one-liner format
  • Slowest operations ranked by duration
  • Unique error/warn messages with occurrence counts

This is enough to answer most questions. Read the output and summarize for the user.

Stage 2 -- Drill down

Once you know what area to investigate, use the script's filters to narrow:

By severity -- only warnings and above:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --level warn

By module -- isolate a subsystem:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --module agent

By time window -- what happened in a specific period:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --after "2026-03-20T14:00:00Z" --before "2026-03-20T15:00:00Z"

By keyword -- search the msg field:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --search "timeout"

Last N lines -- recent activity only:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --tail 500

Slow operations -- custom threshold:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --slow 5000

Filters can be combined:

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --module agent --level warn --after "2026-03-20T14:00:00Z"

Stage 3 -- Raw output for deep inspection

When you need the actual JSON entries (e.g., to examine the full err object or trace a specific request):

Compact one-liners (good for scanning):

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --level error --compact

Raw JSON (full entry data):

python3 scripts/log-digest.py ~/.comis/logs/daemon.log --level error --raw

Stage 4 -- Targeted grep for specific patterns

For very specific lookups where you already know what you're looking for, use grep directly on the log file. This is faster than the script for single-pattern searches:

grep '"errorKind":"auth"' ~/.comis/logs/daemon.log
grep '"agentId":"my-agent"' ~/.comis/logs/daemon.log
grep '"Comis daemon started"' ~/.comis/logs/daemon.log

Common Investigation Patterns

SymptomCommand
General health checkpython3 scripts/log-digest.py ~/.comis/logs/daemon.log
Daemon won't startpython3 scripts/log-digest.py ~/.comis/logs/daemon.log --module daemon --tail 50
LLM not respondingpython3 scripts/log-digest.py ~/.comis/logs/daemon.log --search "LLM" --level warn
Auth/token failurespython3 scripts/log-digest.py ~/.comis/logs/daemon.log --search "auth" --level warn
Bad configpython3 scripts/log-digest.py ~/.comis/logs/daemon.log --search "config" --level warn
Slow responsespython3 scripts/log-digest.py ~/.comis/logs/daemon.log --slow 30000
Channel disconnectspython3 scripts/log-digest.py ~/.comis/logs/daemon.log --module channels --level warn
Find restart boundariesgrep '"Comis daemon started"' ~/.comis/logs/daemon.log
Shutdown issuespython3 scripts/log-digest.py ~/.comis/logs/daemon.log --search "shutdown" --level warn

Reporting

When reporting findings to the user:

1. Lead with the summary -- how many errors, over what time range, which modules affected 2. Group repeated errors by message and show the count, not each occurrence 3. Always include the hint field when present -- it contains actionable fix guidance written by the developers 4. For slow operations, show the duration and what the operation was 5. If the user needs to take action, be specific about what to do based on the hint and errorKind

Related skills

Debuggingmonitoring

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.