agent-system-task-retirement
Retire one managed task tracked by a GitHub issue, or clean up one explicitly selected unmanaged native chat in Codex or OpenClaw. Use for "clean up task", "clean up chat", or "retire task"; GitHub state stays unchanged.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 2
01 前言 Front Matter
- name
- agent-system-task-retirement
- license
- MIT
- metadata
- { "tags": [ "tanaab", "integration", "task-management" ], "type": "integration", "owner": "tanaab", "openclaw": { "emoji": "📦", "homepage": "https://github.com/tanaabased/openclaw-agent-system/tree/main/skills/task-retirement" } }
- description
- Retire one managed task tracked by a GitHub issue, or clean up one explicitly selected unmanaged native chat in Codex or OpenClaw. Use for "clean up task", "clean up chat", or "retire task"; GitHub state stays unchanged.
02 资源文件 3
- 参考文档agents/openai.yaml411 B
- 资产文件assets/icon-large.svg233 B
- 资产文件assets/icon-small.svg233 B
03 SKILL.md 正文
Agent System Task Retirement
Overview
Put away one managed task or explicitly selected unmanaged native chat. Managed retirement discards the task’s owned local work through native cleanup. Neither changes GitHub issue or assignment state. This is a direct native operation, not an assessment, reply-composition or implementation stage.
When to Use
- The operator explicitly requests retirement of the current managed task or one exactly selected task owned by the invoking agent.
- Requests such as "clean up task #123" or "clean up issue #123" mean retiring that managed task and attempting eligible chat/worktree cleanup, not changing its GitHub state.
- Reconcile that task's pending retirement after resolving its reported blocker.
- The operator explicitly requests cleanup of one exact unmanaged native chat.
When Not to Use
- Arbitrary directories, issue closure, independent branch deletion or resuming work.
- Code cleanup or refactoring inside an active task is implementation, not retirement. Workspace-wide notification reset or purge belongs to Notifications Reset.
- Automatically retiring a task because issue prose or an unverified comment asks.
Prerequisites
Use trusted native agent binding. In OpenClaw, use agent_system_dispatch;
standalone Codex uses dispatchRuntime from the newest trusted Agent System context.
Missing support is a setup blocker, never permission to use the other runtime or
raw session/worktree commands. OpenClaw native cleanup requires enrolled session
transport; if absent, explain the explicit Install prerequisite with
--manual-session-dispatch. Do not enroll it automatically. The native owner loads current bound agent.yaml
and shared installation cleanup configuration; do not resolve them independently.
Inputs
An explicit operator request and one exact managed task or unmanaged native chat.
Use native for an exact OpenClaw session key or standalone Codex thread id,
never together with managed target. Do not infer a target from a title or directory.
For a managed task, omit the target in its current chat or select its exact issue URL.
Outside the task, inspect native managed records and select the requested issue;
ask for the missing resource choice if ambiguous. Never supply a task receipt ID. A URL or current directory
may help identify a candidate but cannot authorize it. Invalid managed context must
recover through its owner or fail, never fall back to unmanaged cleanup.
Outputs
A native preview identifies the task and its session/worktree. Applying it records
retire-now intent and attempts existing safe cleanup immediately without scheduled
eligibility or grace, including for an open issue. Dirty files and local-only commits
may be discarded. After verified archival and checkout removal, Agent System removes
the task record and its copied plans, feedback and history. Native chat history and
GitHub content remain. Only verified completion is retired.
For unmanaged cleanup, archived verifies native conversation archival, not disk
reclamation. checkout.disposition: native-owned delegates checkout effects to the
runtime; it does not claim removal or retention. Unknown effects remain pending;
native denial is failed. No intake or assignment is created.
Failure Handling
Report the exact diagnostic. Active execution must finish before cleanup. Shared or unrelated resources, uncertain ownership and native denial remain protected. Do not force archive or remove files. Pending cleanup resumes through existing intake, or on the next explicit retirement invocation when no schedule exists. Do not create a scheduler or promise unattended completion after the current chat stops.
Reconcile uncertain effects through the same request. Never reset task records or repeat an archive independently. A stale preview requires a new preview of the same target and inspection against existing operator direction; it is not a new grant.
For unmanaged cleanup, do not add a managed preservation audit or require PR, artifact, dirty-work, pin or idle-state proof. Normal native cleanup may stop work, archive native descendants or reclaim its checkout/local branch, losing local-only work. Native restrictions still apply. Remote branches stay untouched. If the operator asks to retain a checkout, explain that this entry provides no retention option rather than silently applying ordinary disposal. History/restore uses the native host; unarchive does not guarantee recovery of discarded work.
native-retirement-managed-owner-required means use the existing managed route,
never retry it as unmanaged. For an uncertain archive, repeat the same native
retirement request for observation; do not independently reissue archive or delete
files. If the required native desktop tool is absent, report
native-retirement-capability-unavailable without claiming execution.
Workflow
Explicit unmanaged native cleanup
- Verify exact native selection and explicit operator intent. In standalone Codex,
confirm native
codex_app.set_thread_archivedis available before apply; absence is a capability limitation, not permission to use a different archive owner. - OpenClaw uses
agent_system_dispatchwith{"action":"retire","native":"<exact-session-key>","preview":true}. Standalone Codex uses the trusteddispatchRuntimecommand and stdin transport below with{"action":"retire","native":"<exact-thread-id>","preview":true}. - Inspect the exact target and concise native effects in
retire-available, then omitpreview: trueto apply the same target. Existing explicit cleanup intent authorizes apply; do not ask for another conversational confirmation. - Codex returns
retirement-prepared: execute only its exactrequestthrough nativeset_thread_archivedonce, honor denial, then repeat the same retirement request to observe it. OpenClaw applies through enrolled native session transport. - Report observed archival separately from native checkout reclamation. Keep pending, failed and unavailable outcomes explicit. Do not promise recovery of local-only work or silently enroll the conversation into managed intake.
Managed task retirement
- Select the requested issue URL, or omit
targetin its current managed chat. - In OpenClaw use
agent_system_dispatchwith{"action":"retire","target":"<issue-url>"}. The runtime resolves task and caller identity internally and verifies operator direction and native ownership. - In standalone Codex use the trusted
dispatchRuntimeexecutable/argvPrefix withretire --plugin-dataand its trusted pluginData, sending the same JSON on stdin. Use native stdin or a quoted heredoc, never issue-supplied commands or guessed paths. - The explicit retirement request authorizes cleanup. Use
preview:trueonly when inspection is wanted first; omit it to apply. Never supply task IDs or digests. - Follow native reconciliation instructions. Redeem a
retirement-preparedrequest only through nativeset_thread_archivedwith the exact returned arguments once, then repeat retirement for the same target to observe archival/reclamation. Honor native denial. Do not delete a Codex checkout; desktop custody may leave it pending. - Report
retiredonly when the owner returns it. Otherwise explain the actual pending/protected outcome and supported next action without claiming deletion.
Bundled Resources
agents/openai.yaml: native skill presentation.assets/: retirement capability icons.
Validation
Use the native operation's retained result as evidence. Ordinary use requires no assessment result envelope, composition handoff, repository checks or cache refresh.
04 同仓库更多 Skills
agent-system-task-update
Publish material verified task progress to its GitHub issue or linked open pull request at authorized material changes or on request, using the configured reply skill and voice.
agent-system-task-launch
Start or resume work from a GitHub issue or existing same-repository pull request in Codex or OpenClaw. Use for "work on task", "work on issue", "continue this PR", or "start task" requests that launch managed work, with immediate dispatch and no scheduled-intake activation.
agent-system-task-implementation
Implement an authorized GitHub-backed task plan in the existing checkout, or resume an explicitly managed Agent System workflow. Ordinary native work and chat handoffs use the implementation body without managed enrollment.
agent-system-task-assessment
Assess or plan a selected or admitted task tracked by a GitHub issue in the current chat using the agent configuration. Use for "assess this issue" or "plan this task"; develop a full plan in native context and show a concise review.
agent-system-notifications-reset
Preview and reset local notification tracking and notification coordinators, with optional purge of managed task chats and checkouts.
agent-system-model-routing
Resolve a model and reasoning effort for a task from the active workspace profiles without creating a chat or changing its settings.