Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"version": "0.4.2",
"version": "0.4.3",
"category": "productivity",
"tags": ["terminal", "warp", "oz"]
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/orchestration/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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.2",
"version": "0.4.3",
"author": {
"name": "Warp",
"url": "https://warp.dev"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: oz-child-agent-orchestration
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`.
description: Internal Oz child-agent orchestration playbook for 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 child agent running inside Codex in an Oz cloud agent environment.
Use this skill when you are a spawned child agent running in an Oz cloud agent environment.

# Team agent context
You are a team agent started by another agent.
Expand All @@ -22,7 +22,7 @@ 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 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.
Use messages whenever you need to communicate with the lead agent while work is still in progress. If you cannot continue until an expected parent reply arrives, use the `wait-for-events` skill after checking your inbox. When your assigned work is complete or you are stopping with a blocker rather than awaiting that reply, use the `oz-finish-task` skill to send the outcome and update task status.

## Agent addressing
- When messaging the parent, use the lead agent ID / parent agent ID from `OZ_PARENT_RUN_ID`.
Expand All @@ -36,7 +36,7 @@ IMPORTANT: Use `"$OZ_CLI" run message send --sender-run-id "$OZ_RUN_ID" --to "$O

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.

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.
If your assigned work is complete or you are stopping with a blocker rather than waiting for an expected parent response, do not send your outcome to the parent this way. You MUST use the `oz-finish-task` skill, which sends the outcome and updates task status. If you have instead asked your parent a question and expect its answer before you can continue, send the question, check your inbox, then follow `wait-for-events`. Never wait after completing the assigned task.

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 "<subject>" --body "<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.
Expand Down
37 changes: 37 additions & 0 deletions plugins/orchestration/skills/wait-for-events/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: wait-for-events
description: Wait for inbound lifecycle or message events from other Oz agents when no independent work remains. Use after dispatching work, or after asking your parent a question when you expect its reply. Do not use when your assigned task is complete; use oz-finish-task instead.
---
# Wait for events

Wait for inbound lifecycle or message events from other agents.

## When to use
- Use this skill when you have dispatched work to other agents and cannot make further progress until they reply or emit a lifecycle event.
- As a child, wait only when you expect a response from your parent, for example immediately after sending it a question. Do not wait merely to remain available after completing your assigned task.
- Drain your inbox first. Do not wait while there are unread messages or lifecycle events. Follow `oz-child-agent-orchestration` for listing, reading, and acknowledging messages.
- Do not use this skill as a substitute for `oz-finish-task`. Use `oz-finish-task` when your overall assigned task is complete, or when you are stopping with a blocker rather than waiting for an expected parent response.

## Register the wait

`OZ_CLI` is the CLI for this environment. `OZ_RUN_ID` identifies your run. If either is missing, treat that as a blocker; do not guess.

Run this command with the IDs of the agents whose work or reply you are waiting on:

```sh
"$OZ_CLI" harness-support --run-id "$OZ_RUN_ID" wait-for-events --run-ids "<run-id-1>" "<run-id-2>"
```

For an expected parent reply, use `--run-ids "$OZ_PARENT_RUN_ID"`. Do not guess the parent ID if it is missing.

- The command registers the wait and returns immediately. Its success response contains `waiting_on_run_ids`; it does not contain delivered events.
- Only wait on runs in your orchestration tree that are still working or validly waiting. The server rejects impossible or cyclic waits.
- On success, end your current agent turn immediately. The conversation resumes automatically when a new event arrives. Do not call `oz-finish-task`, exit the harness process, poll, sleep, or issue another command after registering the wait.
- Run the wait command alone. Never run it in parallel with another tool or command, including `oz-finish-task`.
- If registration fails, the wait was not established. Read the error and correct the targets or report the blocker; do not assume the conversation will resume.

## After resumption

- Read the inbound messages and lifecycle events before deciding what to do next. Any inbound event can resume you, not only an event from a listed run.
- If a wait times out and you resume with an empty event result, no event arrived; do not treat that empty result as event delivery.
- Ordinary progress clears the registered target list. If you still cannot proceed, drain the inbox and register a new wait for the remaining runs.
Loading