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..72964fe 100644 --- a/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md +++ b/plugins/orchestration/skills/oz-child-agent-orchestration/SKILL.md @@ -1,40 +1,42 @@ --- 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. +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: 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: 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 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. +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. @@ -43,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 Codex 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`. -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. +### 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`. -Poll your inbox at these times even if you have not just sent a message: +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 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. diff --git a/plugins/orchestration/skills/oz-finish-task/SKILL.md b/plugins/orchestration/skills/oz-finish-task/SKILL.md index 71564a7..03643a8 100644 --- a/plugins/orchestration/skills/oz-finish-task/SKILL.md +++ b/plugins/orchestration/skills/oz-finish-task/SKILL.md @@ -1,11 +1,15 @@ --- name: oz-finish-task -description: Report task completion or failure back to the Oz platform when done with a task. +description: Reports a task as succeeded or blocked. This MUST be used before stopping. For child agents, also sends the summary to the parent. --- -When your task is complete, report the outcome by running: +# Finish Task +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 '' ``` -Replace `` with either `success` or `failure`, and `` with a brief description of what was accomplished (or what went wrong). +- Use `--status success` when the assigned work is complete; this reports `SUCCEEDED`. +- 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).