handoff_create
Create an open handoff with validated target and visibility, then poll its status and result via handoff_get.
Instructions
Create an OPEN handoff (validates target/visibility); emit handoff.created. After creating, poll handoff_get for status/result. Full docs: okto-nexus://reference/tool-docs/handoff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Routing target as a raw JSON object - which agents may CLAIM this handoff (REQUIRED). strategy one of: direct {"strategy":"direct","agent_id":"<id>"}; capability {"strategy":"capability","capability":"<cap>"}; role {"strategy":"role","role":"<role>"}; tag {"strategy":"tag","selector":{"<key>":["<value>",...]}} (flat: AND across keys, OR within values) or rich [{"key":"<k>","operator":"In|NotIn|Exists|DoesNotExist","values":["<v>",...]}] (ANDed; CAUTION: NotIn/DoesNotExist also match agents MISSING the key); broadcast {"strategy":"broadcast"}; mixed {"strategy":"mixed","rules":[<sub-target>,...]}; direct_with_fallback {"strategy":"direct_with_fallback","agent_id":"<id>","fallback_after_seconds":<n>}. Competing-consumers: the first to handoff_claim wins. Hierarchy/catalog rules, examples, edge-cases: okto-nexus://reference/target-grammar. | |
| payload | No | Inline work content (optional; raw JSON object/array, string, or null - NOT JSON-encoded). Returned only to the claimant by handoff_claim / claimant handoff_get. For large content pass an artifact_id. | |
| trace_id | No | Trajectory trace_id to stamp on this handoff (optional; non-empty string, max 128 chars). Needs the feature_trace flag ON, else accepted and ignored; omitted = generate one. | |
| verify_by | No | Who verifies (optional; only WITH acceptance_criteria; raw JSON object). one of: {"kind":"creator"} (default); {"kind":"agent","agent_id":"<id>"} (must be registered); {"kind":"capability","capability":"<name>"} (in the catalog; resolved at verify time). The claimant never verifies their own delivery. | |
| depends_on | No | Handoff ids this one depends on (optional; raw JSON list of 1..20 unique existing ids; IMMUTABLE). Blocked - unlisted/unclaimable - until ALL are COMPLETED. Needs feature_dag ON (rejected while OFF). | |
| session_id | No | Session_id attributing this operation to a specific open session of yours (optional). | |
| visibility | Yes | Who may SEE the handoff (separate from who may CLAIM it = target). one of: public, eligible, private. REQUIRED (case-insensitive). | |
| project_root | Yes | Absolute path to the project (defines the workspace scope). | |
| from_agent_id | Yes | Your agent_id (the creator); recorded as the handoff's originator - the owner is whichever agent later claims it (handoff_claim), not necessarily you. | |
| acceptance_criteria | No | Verification contract (optional; raw JSON list of 1..20 unique non-empty strings, max 500 chars each; IMMUTABLE). handoff_complete then parks the handoff in VERIFYING until the handoff_verify verdict. Needs feature_verification ON (rejected while OFF, never ignored). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||