Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/kenn-io/agentsview/background-workgit clone --depth 1 https://github.com/kenn-io/agentsviewWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00762 |
| Opus 5 | $0.00000 | $0.00381 |
| Sonnet 5 | $0.00000 | $0.00152 |
| Haiku 4.5 | $0.00000 | $0.00076 |
Grade A, and why
background-work scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Background Work and Memory
Read this file before changing watchers, polling, sync scheduling, or other long-running background work. Also read it before investigating memory growth.
- Keep passive daemon memory within a few hundred megabytes on macOS, Linux, and Windows. Treat sustained growth beyond that range as a regression.
- Bound watcher, polling, and sync work by the changed batch, not the full archive. Do not scan or load every stored session for each filesystem event.
- Declare costly scheduling inputs as provider capabilities. Compute them only for providers that use them, and default new capabilities to unsupported.
- Add cardinality-scaling regressions for background paths. Compare small and large archives and prove that unchanged work per event stays bounded. Cover deletion, tombstones, and persistent archives in the same tests.
- Diagnose long-running memory with allocation and CPU profiles, live heap, forced-GC heap, and operating-system physical or dirty memory. Raw RSS does not prove live memory because it includes clean reclaimable mappings.
- Profile branch binaries only against isolated, production-scale database and source clones. Never use live archives or agent transcripts.
- Observe retention long enough to reproduce the reported growth window. On
macOS, record
vmmapphysical footprint and dirty memory. Use portable Go allocation and heap metrics on Linux and Windows.
Usage cache backfill
- Start usage-cache backfill only after the writable archive transaction that changed a session has committed. Mutation hooks enqueue session IDs; they never fill while holding the archive writer.
- Foreground fills are per-session single-flight and detached from request cancellation. Cancelling one waiter must not cancel shared progress.
- Detached fills and rollup builds hold their own cache-generation lease. Retirement cancels their coordinator context and waits for those leases before closing SQLite handles.
- A writable daemon runs one newest-usage-first coverage pass after HTTP readiness. It installs at most 256 sessions per cache transaction and yields between batches. The pass fills normalized facts and daily rollups for the process-local timezone plus up to eight retained recently requested explicit timezones. Installed source and aggregate fingerprints, not a progress cursor, are the authoritative coverage records.
- If a source fingerprint changes during a pass, recapture and restart the snapshot pass at most three times. Already installed current fingerprints make stable batches reusable; never pair facts from the newer source with rollup metadata from the older snapshot.
- Sweep the archive deletion journal before and after the pass and between install batches. Queries also inner-join current archive sessions before ranking, so tombstone processing is hygiene rather than a correctness dependency.
- Run incremental vacuum between batches only when the cache freelist exceeds 4,096 pages, and reclaim at most 256 pages per call.
- Run
PRAGMA optimizebetween substantial batches and after install-heavy foreground fills. Run fullANALYZEafter generation creation and complete initial backfill, not after every batch. - Backfill logs aggregate counts and elapsed time only. Do not log session IDs, projects, paths, prompts, or fact contents.
- Keep newest-first fact plus process-local-rollup coverage within 30 seconds
and complete fact plus process-local-rollup archive coverage within five
minutes on the protected production-scale benchmark clone. These are release
gates, not reasons to delay daemon readiness. A foreground request for an
unbuilt timezone or all-history coverage remains exact and may pay the
remaining
fill facts -> build rollups -> readcold cost.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 61 lines · 0 tokens per session scan A d1679d38e0ba
background-work is an agent published in the GitHub repository kenn-io/agentsview (5,707 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 762 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.