Skip to content

crashes 1.0.0: systemd-coredump crash history with one-click AI diagnosis - #537

Open
UmedjonBA wants to merge 2 commits into
noctalia-dev:mainfrom
UmedjonBA:crashes-plugin
Open

crashes 1.0.0: systemd-coredump crash history with one-click AI diagnosis#537
UmedjonBA wants to merge 2 commits into
noctalia-dev:mainfrom
UmedjonBA:crashes-plugin

Conversation

@UmedjonBA

@UmedjonBA UmedjonBA commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Plugin

  • Id: umedbazarov/crashes
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

Turns systemd-coredump into something you actually notice and can act on. When one of your processes dumps core, a critical notification appears — and, unlike a toast, the crash stays in the panel afterwards, so one that happened while you were watching a video is still there when you come back: program, signal, time, PID, and whether the core file still exists.

Each row offers two actions:

  • Diagnose hands the crash to a terminal AI coding agent (Claude Code, Codex, opencode, grok — whatever is installed) together with a bundled diagnose.md: read coredumpctl info, rule out OOM kills first, correlate the timestamp with filesystem mtimes / the journal / recent package updates, symbolize the backtrace with gdb + debuginfod, and report what the evidence proves versus what is inference. The guide is explicit that diagnosis is read-only and that a core dump is a verbatim copy of process memory which may hold secrets.
  • Mute silences notifications for that one program (kept in the plugin's data dir), because a program you have already explained tends to keep crashing.

A second tab lists the current boot's journal errors at a chosen severity (err and stricter, up to emerg only) with the same per-entry diagnosis, which asks the agent to pull the surrounding journal context before judging the message.

Only your own uid's crashes are shown: a system daemon dumping core is a sysadmin's problem, not a desktop notification.

External dependencies

Declared in dependencies: coredumpctl (the crash source), jq (filters the list outside the Luau runtime), notify-send (notifications), bash (launches the diagnosis command). An AI agent is optional in the sense that the panel works without one — the diagnosis button then tells you what to install; no agent name is hardcoded as required, and agent_cmd is configurable. Left empty, the known agents are tried in turn until one answers, so a signed-out or out-of-quota agent does not leave you with an empty terminal. gdb/debuginfod are optional and only used by the agent if present.

Testing

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Noctalia version tested against: v5.0.0-beta.10 (noctalia-git 5.0.0.r5344.g74e6c2790)
  • Plugin API level: 9

Exercised against real coredumps plus a deliberately crashed process (kill -SEGV): notification fired within a second, the new crash appeared in the panel, mute/unmute persisted across a shell restart, rotated-away dumps were correctly marked and their diagnosis button disabled, the Errors tab returned journal entries at each severity, and both diagnosis buttons opened the agent with the right prompt. noctalia plugins lint clean; no CPU-budget errors in the shell log across repeated opens and refreshes.

Screenshots / Videos

Crashes panel

Checklist

Ready-for-review requirement: Every box in this section must be checked. If any statement is not true, keep the
pull request as Draft. An explanation does not replace a required check.

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the
    README template, documents
    every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and
    understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
Ready-for-review requirement: Every attestation below must be checked.

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

UmedjonBA and others added 2 commits August 30, 2026 11:37
…osis

New plugin. Crashes of your own processes (matched by uid) are announced
with a critical notification and kept in a panel afterwards, so one you
missed is still there later: program, signal, time, PID and whether the
core file still exists.

Each row can hand the crash to a terminal AI coding agent together with a
bundled, evidence-first investigation guide (coredumpctl, OOM checks,
timeline correlation, gdb + debuginfod symbolization, honest reporting,
read-only), or mute notifications for that one program.

A second tab lists the current boot's journal errors by severity with the
same per-entry diagnosis.

Filtering runs in coredumpctl/jq outside the Luau runtime, at most 30 rows
are parsed per poll, and the journal is only queried when its tab is open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three fixes found while using the plugin.

**Diagnosis fell over when the agent could not answer.** The first installed
agent was opened whether or not it worked, so an account that had run out of
quota — or was simply signed out — produced a terminal with an error in it
and nothing else. The known agents are now tried in turn: the chain runs in
the terminal that just opened, asks each one a throwaway question, and moves
on to the next when the answer does not come. Which one was chosen is
visible in the window. It costs one tiny request per diagnosis, so it can be
turned off with `probe_agent`, and `agent_order` decides who goes first. A
configured `agent_cmd` is still used on its own: its headless syntax is
unknown, so it cannot be tested this way.

**Agents behind a proxy could not connect.** A panel click inherits neither
the shell profile nor anything exported in it, so a proxy or an API key set
there never reached the agent. The new `env_file` setting is sourced before
it starts.

**Two icons never rendered.** `ui.glyph` takes `name`, not `glyph`; with the
wrong prop the icon is silently dropped and the rows lost their bug marker.

Verified by building the launch command the panel produces and running it
against stub agents: one that reports a usage limit is skipped in favour of
the next, and with none available the terminal explains what to install
rather than sitting empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@UmedjonBA

Copy link
Copy Markdown
Contributor Author

Pushed three fixes found while running the plugin day to day, all in the same 1.0.0 (nothing here has been released yet):

  • Agent fallback. The first installed agent used to be opened whether or not it could answer, so an account out of quota — or just signed out — gave you a terminal with an error in it. The known agents are now tried in turn from inside the terminal that opens: each is asked a throwaway question and skipped if the answer does not come, with the choice visible in the window. Off by setting probe_agent to false; agent_order decides who goes first. A configured agent_cmd is still used on its own, since its headless syntax is unknown and cannot be tested this way.
  • env_file. A panel click inherits nothing from the shell profile, so an agent behind a proxy could not connect at all. The file is sourced before the agent starts.
  • Icon fix. ui.glyph takes name, not glyph; with the wrong prop the icon is dropped silently and the crash rows had lost their bug marker.

The fallback was checked by taking the exact launch command the panel builds and running it against stub agents — one reporting a usage limit is skipped for the next, and with none available the terminal says what to install instead of sitting empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant