From 0c6a93fcf84394391f1421839184c7bfe1d5c420 Mon Sep 17 00:00:00 2001 From: seemeroland Date: Tue, 3 Nov 2026 16:20:30 -0800 Subject: [PATCH 1/4] Require durable Oz cloud completion handoffs Co-Authored-By: Warp --- .agents/plugins/marketplace.json | 2 +- .../orchestration/.codex-plugin/plugin.json | 2 +- .../oz-child-agent-orchestration/SKILL.md | 20 +++--- .../skills/oz-finish-task/SKILL.md | 17 ++++- .../orchestration/tests/test-oz-completion.sh | 63 +++++++++++++++++++ 5 files changed, 89 insertions(+), 15 deletions(-) create mode 100644 plugins/orchestration/tests/test-oz-completion.sh diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 7fc13a6..3293d15 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -26,7 +26,7 @@ "installation": "AVAILABLE", "authentication": "ON_INSTALL" }, - "version": "0.4.1", + "version": "0.4.2", "category": "productivity", "tags": ["terminal", "warp", "oz"] } diff --git a/plugins/orchestration/.codex-plugin/plugin.json b/plugins/orchestration/.codex-plugin/plugin.json index 0f09daf..2552e62 100644 --- a/plugins/orchestration/.codex-plugin/plugin.json +++ b/plugins/orchestration/.codex-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "orchestration", "description": "Warp integration for Codex in Oz cloud agent environments, including parent-message delivery hooks and skills", - "version": "0.4.1", + "version": "0.4.2", "author": { "name": "Warp", "url": "https://warp.dev" diff --git a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md index fce0fab..cbb1816 100644 --- a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md +++ b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md @@ -1,39 +1,39 @@ --- name: oz-child-agent-orchestration -description: Internal Oz child-agent orchestration playbook for Codex child runs. Use only when the Oz harness system prompt tells you to coordinate with a lead run through the Oz CLI in `OZ_CLI`, using `OZ_RUN_ID` and `OZ_PARENT_RUN_ID`. +description: Internal Oz child-agent orchestration playbook for Codex child runs. Invoke only when the Oz harness system prompt tells you to coordinate with a lead run through the Oz CLI in `OZ_CLI`, using `OZ_RUN_ID` and `OZ_PARENT_RUN_ID`. --- # Oz Child Agent Orchestration -Use this skill when you are a spawned team agent running inside Codex. +Use this skill when you are a spawned child agent running inside Codex in an Oz cloud agent environment. # Team agent context You are a team agent started by another agent. Your agent ID: the value of `OZ_RUN_ID` +Your parent agent ID: the value of `OZ_PARENT_RUN_ID` Lead agent ID (the agent that started you): the value of `OZ_PARENT_RUN_ID` Your Oz CLI command: the value of `OZ_CLI` ## How to work - Focus on the subtask you are given. Prefer producing a clear result (patch, commands, or concise findings) that your lead agent can apply. - Minimize direct interaction with the user. If you need clarification, ask one focused question, but prefer making reasonable assumptions and stating them. -- Keep your output concise and operational (for example exact file paths, commands to run, and concrete next steps). +- Keep your output concise and operational (e.g., exact file paths, commands to run, and concrete next steps). - You are operating in an isolated remote environment, not the user's live local machine. - Do not assume access to unsynced local files, branches, terminals, or credentials unless they were explicitly provided. - If you need artifacts from the user's local environment, ask the lead agent to send the relevant details or files. ## Coordination -Coordinate progress and status through the lead agent. If you complete your task, provide a short summary and any validation steps for the lead agent to run. +Coordinate progress and blockers through the lead agent. On completion, use the `oz-finish-task` skill with your full answer or actionable handoff as its summary. ## Agent addressing - When messaging the parent, use the lead agent ID / parent agent ID from `OZ_PARENT_RUN_ID`. - If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing from your environment, treat that as a blocker. Do not guess one; wait for corrected context before attempting to message the parent. ## Messaging -IMPORTANT: You MUST use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` to keep the lead agent informed. Do not silently complete your work. +IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` for progress updates and blockers. Before stopping after completing or failing your task, you MUST use the `oz-finish-task` skill. It updates your task status and sends its summary to the parent automatically; do not send a separate Complete message or substitute plain-text output. IMPORTANT: Sending a message is not a terminal action. After every `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`, you MUST check your inbox before deciding whether to continue, wait, or stop. Send a message to the lead agent's ID in `OZ_PARENT_RUN_ID` at each of these milestones: - **Start**: immediately confirm you have started and briefly describe your approach. -- **Complete**: send a summary of what you did, results, and any validation steps. - **Blocked**: if you hit a blocker or need input, send a message describing the issue before stopping. You have access to messaging commands for communicating with other agents: @@ -44,7 +44,7 @@ You have access to messaging commands for communicating with other agents: Use all of these parameters on `"$OZ_CLI" run message send`: `--sender-run-id "$OZ_RUN_ID"`, `--to "$OZ_PARENT_RUN_ID"`, `--subject ""`, and `--body ""`. If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing, that is a blocker. ### Required polling workflow -Do not assume Codex will surface parent messages automatically. +Do not assume your harness will surface parent messages automatically. Use this workflow whenever you coordinate with the parent: 1. Send your milestone message with `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`. 2. Immediately run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25`. @@ -53,9 +53,9 @@ Use this workflow whenever you coordinate with the parent: Poll your inbox at these times even if you have not just sent a message: - before starting a new chunk of work after any pause, -- before deciding you still need to wait for lead agent input, +- before deciding you still need to wait for parent input, - before saying you are done, waiting, standing by, or otherwise ending your turn. ### Waiting for replies -If you are waiting on the lead agent, periodically poll for unread messages yourself instead of assuming the harness will wake you automatically. Use a modest cadence rather than a tight loop — for example wait a short interval between checks, then run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25` again. Once a reply arrives, read it and resume work. -Never say you are standing by until a post-send or pre-idle inbox check has shown no unread messages that require action. +If you are waiting on the parent, periodically poll for unread messages yourself instead of assuming the harness will wake you automatically. Use a modest cadence rather than a tight loop — for example, wait a short interval between checks, then run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25` again. Once a reply arrives, read it and resume work. +Never say you are standing by until a post-send or pre-idle inbox check has shown no unread parent messages that require action. diff --git a/plugins/orchestration/skills/oz-finish-task/SKILL.md b/plugins/orchestration/skills/oz-finish-task/SKILL.md index 71564a7..eba7477 100644 --- a/plugins/orchestration/skills/oz-finish-task/SKILL.md +++ b/plugins/orchestration/skills/oz-finish-task/SKILL.md @@ -1,11 +1,22 @@ --- name: oz-finish-task -description: Report task completion or failure back to the Oz platform when done with a task. +description: Reports final task status and sends a child run's summary to its parent. Required before stopping after completing or failing a task, including informational tasks. --- -When your task is complete, report the outcome by running: +# Finish Task +You MUST use this skill before stopping when your task is complete or has ended unsuccessfully, even if it was purely informational or no code changed. A plain-text final response, CLI exit, or harness stop notification does not replace reporting completion. + +This command updates your task status. For a child run, it also sends the summary as a message to the parent agent's inbox, so do not send a separate completion message with `oz run message send`. + +Waiting for input is not completion. If work is still pending a reply, continue the orchestration skill's inbox polling workflow rather than reporting a final outcome. + +Finish all work and artifact reporting first. For a child run, check your unread inbox and address any parent instructions before finishing. Then run the following as your final action: ```sh "$OZ_CLI" harness-support finish-task --status --summary '' ``` -Replace `` with either `success` or `failure`, and `` with a brief description of what was accomplished (or what went wrong). +- Use `success` when the assigned work is complete, or `failure` when it could not be completed. +- Put the full answer or actionable handoff in ``: findings or decisions, artifact paths or links, validation results, and any blockers or follow-up needed. For an informational task, include the answer itself, not just "research completed." +- Pass the summary as one shell argument, quoting or escaping its contents correctly. +- Wait for the command to succeed before stopping. If it fails, resolve the error and retry; do not claim completion or fall back to a plain-text final response. +- After a successful finish, stop without repeating the summary as ordinary assistant text. diff --git a/plugins/orchestration/tests/test-oz-completion.sh b/plugins/orchestration/tests/test-oz-completion.sh new file mode 100644 index 0000000..bb725dd --- /dev/null +++ b/plugins/orchestration/tests/test-oz-completion.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +set -euo pipefail + +PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +python3 - "$PLUGIN_ROOT" <<'PY' +import json +import re +import shlex +import sys +from pathlib import Path + +plugin = Path(sys.argv[1]) +skills = {} +for name in ("oz-finish-task", "oz-child-agent-orchestration"): + text = (plugin / "skills" / name / "SKILL.md").read_text() + frontmatter, body = text.removeprefix("---\n").split("\n---\n", 1) + assert f"name: {name}\n" in frontmatter + "\n" + assert re.search(r"^description: \S.+", frontmatter, re.MULTILINE) + assert text.count("```") % 2 == 0 + assert '\\"' not in body, "CLI examples must quote variables, not literal quotes" + skills[name] = body + +finish = skills["oz-finish-task"] +for requirement in ( + "You MUST use this skill before stopping", + "even if it was purely informational or no code changed", + "summary as a message to the parent agent's inbox", + "do not send a separate completion message", + "Put the full answer or actionable handoff", + "check your unread inbox", + "one shell argument", + "resolve the error and retry", + "After a successful finish, stop without repeating", + "Waiting for input is not completion", +): + assert requirement in finish, f"Missing completion requirement: {requirement}" + +command = re.search(r"```sh\n(.+)\n```", finish).group(1) +assert shlex.split(command) == [ + "$OZ_CLI", "harness-support", "finish-task", + "--status", "", "--summary", "", +] +coordination = skills["oz-child-agent-orchestration"] +for requirement in ( + "for progress updates and blockers", + "oz-finish-task", + "do not send a separate Complete message or substitute plain-text output", + "Immediately run", + "run message list", +): + assert requirement in coordination, f"Missing orchestration requirement: {requirement}" +assert "- **Complete**:" not in coordination + +manifest = next(plugin.glob(".*-plugin/plugin.json")) +marketplace = next(plugin.parents[1].glob(".*/**/marketplace.json")) +metadata = json.loads(manifest.read_text()) +entry = next( + item for item in json.loads(marketplace.read_text())["plugins"] + if item["name"] == metadata["name"] +) +assert entry["version"] == metadata["version"], "Marketplace version must match plugin" +print(f"PASS {metadata['name']}: cloud completion contract and version consistency") +PY From 6bbcecb7a08348c19229183765509cc783cd2fb1 Mon Sep 17 00:00:00 2001 From: seemeroland Date: Tue, 3 Nov 2026 17:01:12 -0800 Subject: [PATCH 2/4] Clarify status-preserving messages and blocked outcomes Co-Authored-By: Warp --- .../oz-child-agent-orchestration/SKILL.md | 10 +-- .../skills/oz-finish-task/SKILL.md | 9 +-- .../orchestration/tests/test-oz-completion.sh | 63 ------------------- 3 files changed, 10 insertions(+), 72 deletions(-) delete mode 100644 plugins/orchestration/tests/test-oz-completion.sh diff --git a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md index cbb1816..3fd5a8a 100644 --- a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md +++ b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md @@ -22,19 +22,19 @@ Your Oz CLI command: the value of `OZ_CLI` - If you need artifacts from the user's local environment, ask the lead agent to send the relevant details or files. ## Coordination -Coordinate progress and blockers through the lead agent. On completion, use the `oz-finish-task` skill with your full answer or actionable handoff as its summary. +Use messages whenever you need to communicate with the lead agent without updating your task status. When stopping with a succeeded or blocked outcome, use the `oz-finish-task` skill with your full answer or actionable handoff as its summary. ## Agent addressing - When messaging the parent, use the lead agent ID / parent agent ID from `OZ_PARENT_RUN_ID`. - If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing from your environment, treat that as a blocker. Do not guess one; wait for corrected context before attempting to message the parent. ## Messaging -IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` for progress updates and blockers. Before stopping after completing or failing your task, you MUST use the `oz-finish-task` skill. It updates your task status and sends its summary to the parent automatically; do not send a separate Complete message or substitute plain-text output. +IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` whenever you need to send a message without updating your task status. This keeps the task in progress; it is not limited to progress updates or blockers. Before stopping with a `SUCCEEDED` or `BLOCKED` outcome, you MUST use the `oz-finish-task` skill instead. It updates the task status and sends your summary to the parent automatically; do not send a separate message reporting that same outcome or substitute plain-text output. IMPORTANT: Sending a message is not a terminal action. After every `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`, you MUST check your inbox before deciding whether to continue, wait, or stop. -Send a message to the lead agent's ID in `OZ_PARENT_RUN_ID` at each of these milestones: +Send messages to the lead agent's ID in `OZ_PARENT_RUN_ID` whenever coordination is needed while keeping the task in progress, for example: - **Start**: immediately confirm you have started and briefly describe your approach. -- **Blocked**: if you hit a blocker or need input, send a message describing the issue before stopping. +- **Coordination**: share findings, ask questions, request input, or explain an impediment while continuing the run. You have access to messaging commands for communicating with other agents: - `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`: Send a message to one or more agents by their run IDs. Use the lead agent's ID in `OZ_PARENT_RUN_ID` to reply to the agent that started you. `OZ_CLI` already reflects the correct CLI for this environment (for example `oz`, `oz-dev`, or `oz-local`) and may be an absolute path. @@ -46,7 +46,7 @@ Use all of these parameters on `"$OZ_CLI" run message send`: `--sender-run-id "$ ### Required polling workflow Do not assume your harness will surface parent messages automatically. Use this workflow whenever you coordinate with the parent: -1. Send your milestone message with `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`. +1. Send your message with `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`. 2. Immediately run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25`. 3. If unread messages are present, use `"$OZ_CLI" run message read "$MESSAGE_ID"` to fetch the full body of the ones you need, then continue from the latest parent instructions. 4. Only after that inbox check may you decide to keep working, wait, or stop. diff --git a/plugins/orchestration/skills/oz-finish-task/SKILL.md b/plugins/orchestration/skills/oz-finish-task/SKILL.md index eba7477..31db92c 100644 --- a/plugins/orchestration/skills/oz-finish-task/SKILL.md +++ b/plugins/orchestration/skills/oz-finish-task/SKILL.md @@ -1,13 +1,13 @@ --- name: oz-finish-task -description: Reports final task status and sends a child run's summary to its parent. Required before stopping after completing or failing a task, including informational tasks. +description: Reports a task as succeeded or blocked before stopping, including informational tasks. For child agents, also sends the summary to the parent. --- # Finish Task You MUST use this skill before stopping when your task is complete or has ended unsuccessfully, even if it was purely informational or no code changed. A plain-text final response, CLI exit, or harness stop notification does not replace reporting completion. -This command updates your task status. For a child run, it also sends the summary as a message to the parent agent's inbox, so do not send a separate completion message with `oz run message send`. +Use this skill for both parent/root and child runs. It updates the task status to `SUCCEEDED` or `BLOCKED`. If you are a child agent, it also sends the summary as a message to the parent agent's inbox for either outcome; do not also use `oz run message send` to report that same outcome. -Waiting for input is not completion. If work is still pending a reply, continue the orchestration skill's inbox polling workflow rather than reporting a final outcome. +To send a message while keeping the task in progress, use `oz run message send` without reporting a final outcome. If you cannot proceed and are stopping the run, report `BLOCKED` using the failure option below. A blocked run can resume when it receives a follow-up. Finish all work and artifact reporting first. For a child run, check your unread inbox and address any parent instructions before finishing. Then run the following as your final action: @@ -15,7 +15,8 @@ Finish all work and artifact reporting first. For a child run, check your unread "$OZ_CLI" harness-support finish-task --status --summary '' ``` -- Use `success` when the assigned work is complete, or `failure` when it could not be completed. +- Use `--status success` when the assigned work is complete; this reports `SUCCEEDED`. +- Use `--status failure` when you cannot complete the assigned work or need input before continuing and are stopping the run; this reports `BLOCKED`, not `FAILED`. The CLI accepts `success` or `failure`, not `blocked`. - Put the full answer or actionable handoff in ``: findings or decisions, artifact paths or links, validation results, and any blockers or follow-up needed. For an informational task, include the answer itself, not just "research completed." - Pass the summary as one shell argument, quoting or escaping its contents correctly. - Wait for the command to succeed before stopping. If it fails, resolve the error and retry; do not claim completion or fall back to a plain-text final response. diff --git a/plugins/orchestration/tests/test-oz-completion.sh b/plugins/orchestration/tests/test-oz-completion.sh deleted file mode 100644 index bb725dd..0000000 --- a/plugins/orchestration/tests/test-oz-completion.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -python3 - "$PLUGIN_ROOT" <<'PY' -import json -import re -import shlex -import sys -from pathlib import Path - -plugin = Path(sys.argv[1]) -skills = {} -for name in ("oz-finish-task", "oz-child-agent-orchestration"): - text = (plugin / "skills" / name / "SKILL.md").read_text() - frontmatter, body = text.removeprefix("---\n").split("\n---\n", 1) - assert f"name: {name}\n" in frontmatter + "\n" - assert re.search(r"^description: \S.+", frontmatter, re.MULTILINE) - assert text.count("```") % 2 == 0 - assert '\\"' not in body, "CLI examples must quote variables, not literal quotes" - skills[name] = body - -finish = skills["oz-finish-task"] -for requirement in ( - "You MUST use this skill before stopping", - "even if it was purely informational or no code changed", - "summary as a message to the parent agent's inbox", - "do not send a separate completion message", - "Put the full answer or actionable handoff", - "check your unread inbox", - "one shell argument", - "resolve the error and retry", - "After a successful finish, stop without repeating", - "Waiting for input is not completion", -): - assert requirement in finish, f"Missing completion requirement: {requirement}" - -command = re.search(r"```sh\n(.+)\n```", finish).group(1) -assert shlex.split(command) == [ - "$OZ_CLI", "harness-support", "finish-task", - "--status", "", "--summary", "", -] -coordination = skills["oz-child-agent-orchestration"] -for requirement in ( - "for progress updates and blockers", - "oz-finish-task", - "do not send a separate Complete message or substitute plain-text output", - "Immediately run", - "run message list", -): - assert requirement in coordination, f"Missing orchestration requirement: {requirement}" -assert "- **Complete**:" not in coordination - -manifest = next(plugin.glob(".*-plugin/plugin.json")) -marketplace = next(plugin.parents[1].glob(".*/**/marketplace.json")) -metadata = json.loads(manifest.read_text()) -entry = next( - item for item in json.loads(marketplace.read_text())["plugins"] - if item["name"] == metadata["name"] -) -assert entry["version"] == metadata["version"], "Marketplace version must match plugin" -print(f"PASS {metadata['name']}: cloud completion contract and version consistency") -PY From 10bd61309547da614d79f379181180301b6426d3 Mon Sep 17 00:00:00 2001 From: seemeroland Date: Wed, 4 Nov 2026 11:38:54 -0800 Subject: [PATCH 3/4] Sync latest cloud messaging and finish prompting Mirror Warp prompting updates from 35361bcbfb and 3b5a3767af while preserving Codex-specific skill metadata. Co-Authored-By: Warp --- .../oz-child-agent-orchestration/SKILL.md | 14 ++++++++------ .../skills/oz-finish-task/SKILL.md | 18 +++++------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md index 3fd5a8a..6968be4 100644 --- a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md +++ b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md @@ -22,19 +22,21 @@ Your Oz CLI command: the value of `OZ_CLI` - If you need artifacts from the user's local environment, ask the lead agent to send the relevant details or files. ## Coordination -Use messages whenever you need to communicate with the lead agent without updating your task status. When stopping with a succeeded or blocked outcome, use the `oz-finish-task` skill with your full answer or actionable handoff as its summary. +Use messages whenever you need to communicate with the lead agent while work is still in progress. When stopping successfully or unsuccessfully, use the `oz-finish-task` skill to combine sending a message to the lead agent with updating task status. ## Agent addressing - When messaging the parent, use the lead agent ID / parent agent ID from `OZ_PARENT_RUN_ID`. - If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing from your environment, treat that as a blocker. Do not guess one; wait for corrected context before attempting to message the parent. ## Messaging -IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` whenever you need to send a message without updating your task status. This keeps the task in progress; it is not limited to progress updates or blockers. Before stopping with a `SUCCEEDED` or `BLOCKED` outcome, you MUST use the `oz-finish-task` skill instead. It updates the task status and sends your summary to the parent automatically; do not send a separate message reporting that same outcome or substitute plain-text output. -IMPORTANT: Sending a message is not a terminal action. After every `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`, you MUST check your inbox before deciding whether to continue, wait, or stop. +IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""` whenever you need to send a message while work is still in progress. This does not update the task status, leaving it in progress. +- When messaging the parent, use the lead agent ID / parent agent ID from `OZ_PARENT_RUN_ID`. +- If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing from your environment, treat that as a blocker. Do not guess one; wait for corrected context before attempting to message the parent. +- Sending a message this way is not a terminal action. After every `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`, you MUST check your inbox before deciding whether to continue, wait, or stop. + +You should send a message to the lead agent's ID in `OZ_PARENT_RUN_ID` immediately once you have started work, briefly describing your approach. Afterwards, send as needed while continuing work, such as if you were asked to share preliminary findings, or if you need to ask questions. -Send messages to the lead agent's ID in `OZ_PARENT_RUN_ID` whenever coordination is needed while keeping the task in progress, for example: -- **Start**: immediately confirm you have started and briefly describe your approach. -- **Coordination**: share findings, ask questions, request input, or explain an impediment while continuing the run. +If you are stopping work, either because you have completed the work or hit a blocker/need input and cannot continue, do not send your message to the parent this way. You MUST use the `oz-finish-task` skill before stopping, which combines sending a message to the lead agent while updating task status. You have access to messaging commands for communicating with other agents: - `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`: Send a message to one or more agents by their run IDs. Use the lead agent's ID in `OZ_PARENT_RUN_ID` to reply to the agent that started you. `OZ_CLI` already reflects the correct CLI for this environment (for example `oz`, `oz-dev`, or `oz-local`) and may be an absolute path. diff --git a/plugins/orchestration/skills/oz-finish-task/SKILL.md b/plugins/orchestration/skills/oz-finish-task/SKILL.md index 31db92c..03643a8 100644 --- a/plugins/orchestration/skills/oz-finish-task/SKILL.md +++ b/plugins/orchestration/skills/oz-finish-task/SKILL.md @@ -1,23 +1,15 @@ --- name: oz-finish-task -description: Reports a task as succeeded or blocked before stopping, including informational tasks. For child agents, also sends the summary to the parent. +description: Reports a task as succeeded or blocked. This MUST be used before stopping. For child agents, also sends the summary to the parent. --- # Finish Task -You MUST use this skill before stopping when your task is complete or has ended unsuccessfully, even if it was purely informational or no code changed. A plain-text final response, CLI exit, or harness stop notification does not replace reporting completion. - -Use this skill for both parent/root and child runs. It updates the task status to `SUCCEEDED` or `BLOCKED`. If you are a child agent, it also sends the summary as a message to the parent agent's inbox for either outcome; do not also use `oz run message send` to report that same outcome. - -To send a message while keeping the task in progress, use `oz run message send` without reporting a final outcome. If you cannot proceed and are stopping the run, report `BLOCKED` using the failure option below. A blocked run can resume when it receives a follow-up. - -Finish all work and artifact reporting first. For a child run, check your unread inbox and address any parent instructions before finishing. Then run the following as your final action: +You MUST use run the command below before stopping when your task is complete or has ended unsuccessfully, even if it was purely informational. A plain-text final response does not replace reporting completion through this command: ```sh "$OZ_CLI" harness-support finish-task --status --summary '' ``` - Use `--status success` when the assigned work is complete; this reports `SUCCEEDED`. -- Use `--status failure` when you cannot complete the assigned work or need input before continuing and are stopping the run; this reports `BLOCKED`, not `FAILED`. The CLI accepts `success` or `failure`, not `blocked`. -- Put the full answer or actionable handoff in ``: findings or decisions, artifact paths or links, validation results, and any blockers or follow-up needed. For an informational task, include the answer itself, not just "research completed." -- Pass the summary as one shell argument, quoting or escaping its contents correctly. -- Wait for the command to succeed before stopping. If it fails, resolve the error and retry; do not claim completion or fall back to a plain-text final response. -- After a successful finish, stop without repeating the summary as ordinary assistant text. +- Use `--status failure` when you cannot complete the assigned work or require input and are stopping the run; this reports `BLOCKED`, not `FAILED`, which is reserved for infrastructure failures. The CLI accepts `success` or `failure`, not `blocked`. +- If you are a child, `` is sent as a message to your parent, so should contain your full reply or actionable handoff to the parent +- If you are not a child, `` should be a brief description of what was accomplished (or what went wrong). From 934dcfdc392f2a7f94d0c8b8152a521a3ce843d4 Mon Sep 17 00:00:00 2001 From: seemeroland Date: Wed, 4 Nov 2026 12:44:34 -0800 Subject: [PATCH 4/4] Sync updated message-checking instructions Mirror Warp commit d712f9a4c4. Co-Authored-By: Warp --- .../oz-child-agent-orchestration/SKILL.md | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md index 6968be4..72964fe 100644 --- a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md +++ b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md @@ -45,19 +45,16 @@ You have access to messaging commands for communicating with other agents: - `"$OZ_CLI" run message mark-delivered "$MESSAGE_ID"` or `"$OZ_CLI" run message delivered "$MESSAGE_ID"`: Acknowledge delivery if your harness surfaces an inbox notification that requires it. Use all of these parameters on `"$OZ_CLI" run message send`: `--sender-run-id "$OZ_RUN_ID"`, `--to "$OZ_PARENT_RUN_ID"`, `--subject ""`, and `--body ""`. If `OZ_RUN_ID`, `OZ_PARENT_RUN_ID`, or `OZ_CLI` is missing, that is a blocker. -### Required polling workflow -Do not assume your harness will surface parent messages automatically. -Use this workflow whenever you coordinate with the parent: -1. Send your message with `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$OZ_PARENT_RUN_ID" --subject "" --body ""`. -2. Immediately run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25`. -3. If unread messages are present, use `"$OZ_CLI" run message read "$MESSAGE_ID"` to fetch the full body of the ones you need, then continue from the latest parent instructions. -4. Only after that inbox check may you decide to keep working, wait, or stop. - -Poll your inbox at these times even if you have not just sent a message: +### Checking for messages +Usually, your harness will surface messages for you automatically, but you can poll for messages proactively by running +`"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25`. + +Omit the `--unread` flag if you expect new messages to exist but don't see them - it's possible they were mistakenly marked as read even if you didn't actually read them. + +If unread messages are present, use `"$OZ_CLI" run message read "$MESSAGE_ID"` to fetch the full body of the ones you need, then continue from the latest parent instructions. + +It's a good idea to poll your inbox at these times: +- you just sent a message - before starting a new chunk of work after any pause, - before deciding you still need to wait for parent input, - before saying you are done, waiting, standing by, or otherwise ending your turn. - -### Waiting for replies -If you are waiting on the parent, periodically poll for unread messages yourself instead of assuming the harness will wake you automatically. Use a modest cadence rather than a tight loop — for example, wait a short interval between checks, then run `"$OZ_CLI" run message list "$OZ_RUN_ID" --unread --limit 25` again. Once a reply arrives, read it and resume work. -Never say you are standing by until a post-send or pre-idle inbox check has shown no unread parent messages that require action.