Repository navigation
feat: retention for messages and attachments (amp-prune), cheaper status line - #40
Merged
Merged
Conversation
…p-prune) amp-prune.sh removes read inbox messages, sent messages and unreferenced attachment folders older than N days (dry run by default, unread kept). save_to_inbox runs it in the background at most once per 24 h per agent (AMP_RETENTION_DAYS, 0 disables). The status line counts unread in one jq pass and caches the /api/agents lookup for 60 s. amp-register cleans its temp file on exit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… by default On a real fleet (236 agents, 407 MB) the 90-day default would have deleted 8,061 messages to free 18 MB; attachments were 0.1 MB. Messages are the agents' conversation record, so nothing is removed unless AMP_RETENTION_DAYS is set. The manual amp-prune.sh stays dry-run by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
jpelaez-23blocks
added a commit
that referenced
this pull request
Oct 9, 2026
Version bump for 0.3.0: package.json, plugin.json, .claude-plugin/plugin.json, SKILL.md metadata.version. Includes #40 (amp-prune, cheaper status line) and the earlier unreleased doorbell (#39) and status-line row 2 changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Juan Pelaez <juan.pelaez@3metas.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the AI Maestro ecosystem log and disk audit. The message store had no retention tool, and the status line cost grew with the inbox.
scripts/amp-prune.sh(new): dry run by default;--apply,--days N(default 90, minimum 1),--include-unread,--id. Removes read inbox messages and sent copies older than N days, and attachment folders older than N days that no remaining message refers to. Unread messages are kept unless--include-unread. Never follows symlinks; only deletes under the agent'smessages/andattachments/folders; handles spaces; prints a summary with bytes freed.AMP_RETENTION_DAYS=Nset, saving to the inbox runs the prune in the background at most once per 24 h per agent (stamp$AMP_DIR/.last-prune), silent, never failing the caller. Off by default: on a real fleet (236 agents, 407 MB) a 90-day default would have deleted 8,061 messages to free 18 MB, so nothing is removed unless the owner asks.amp-statusline.sh: unread is counted in onejqpass (per-file fallback on invalid JSON) instead of onejqper inbox file on every refresh; the/api/agentslookup is cached for 60 s. Output is identical on a fixture (tested against the previous script).amp-register.sh: temp file removed on exit.commands/amp-prune.md, plugin manifests.tests/unit/prune.bats,tests/unit/statusline_perf.bats;./run_tests.sh309 ok, 0 not ok;shellcheck --severity=warning scripts/*.shclean. Run on macOS only; GNU find paths not exercised locally.🤖 Generated with Claude Code