一键导入
session-memory-mailbox-exclusion
Prevent session-memory background forks from draining teammate mailbox attachments that belong to the main lead thread.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Prevent session-memory background forks from draining teammate mailbox attachments that belong to the main lead thread.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Collapse multiple change sources into one caller-facing boolean so headless bootstraps know whether a downstream refresh is necessary.
After awaiting persistence work, update the shared budget state for each `tool_use_id` exactly once so no concurrent reader ever sees a half-committed decision.
Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping.
Lazily extract referenced files for bundled skills so large prompts stay offline until needed.
Persist a cache-safe stop-hook context snapshot only for main session queries so later helpers can resume from stable state without fork pollution.
Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails.
| name | session-memory-mailbox-exclusion |
| description | Prevent session-memory background forks from draining teammate mailbox attachments that belong to the main lead thread. |
| metadata | {"author":"ychampion"} |
Domain: multi-agent
Trigger: Apply when a background or forked agent shares team context with a leader thread and must not consume mailbox messages intended for the leader.
Source Pattern: Distilled from reviewed multi-agent coordination and child-runtime patterns.
Treat mailbox-draining attachments as ownership-sensitive, not universally thread-safe. When a background fork shares the same team context as the lead agent, exclude the mailbox attachment path for that fork so it cannot mark leader messages as read and silently steal them from the permanent conversation stream. Keep the exclusion narrow and source-based so the main thread and legitimate teammate consumers still receive mailbox attachments normally.
If a session-memory extractor runs as a background fork against the same team context as the lead agent, skip its teammate mailbox attachment. The leader still receives teammate DMs as durable conversation turns, while the background worker avoids consuming them as ephemeral side attachments.