Skip to main content
Glama

HarflowMCP

HarflowMCP is a local MCP server that dispatches coding tasks to Claude Code, Codex, opencode, Vibe, Antigravity, and the Cursor Agent CLI. It provides persistent task history, bounded reads, cancellation, continuation, and reusable workflows. On measured Claude Code versions, callers can opt in to approving individual Bash, Read, Write and Edit requests one exact action at a time (see harness permissions); on macOS with codex-cli 0.163.0 the same opt-in approves individual Codex commands and, with caller_write_approvals, patches through codex app-server (see Codex caller approvals), and can grant a task a bounded list of specific Bash commands with allowed_commands instead of unrestricted access (see dispatch-time command grants).

Signing into the Cursor editor does not sign in the agent CLI. Headless Cursor dispatch needs agent login or CURSOR_API_KEY. Confirm with agent status: it has to report an access token. That check reads the CLI credential store for the current HOME, so a shell whose home directory is somewhere else still says it is not logged in after a successful agent login. Cursor refuses caller approvals and allowed_commands. Its read_only launch asks for plan mode; write_in_repo, publish, and unrestricted share one print-mode command until a measured boundary separates them. There is no live follow-up on stdin. The pinned CLI is 2026.10.22-27dcf5f on macOS arm64. See harness permissions and backend CLI facts.

MCP task status and single-task waits default to compact polling while preserving the complete final summary, approval attention and recovery diagnostics. Use detail="full" for execution metadata; include_tail=true explicitly includes the raw tail in either mode. Workflow discovery returns names, descriptions, revisions and IDs by default; get_workflow(name) reads the full graph. Prefer wait holds of 50 seconds or less on remote MCP connections. See the waiting and polling guide.

Task ids and workflow run ids may be passed as unique prefixes of at least 8 characters; replies echo the resolved id in resolved_from, and an ambiguous prefix lists its candidates. See id prefixes.

harflow-ctl cancel TASK_ID --json includes a bounded final observation of recorded tasks and pending launches (task-cancel-cascade.v1): stopped, running or unknown per target, with explicit discovery coverage. See the cancellation observation contract.

Direct human clients can discover pre-record launch attempts after restart with harflow-ctl task-pending-page --json and look up an exact full ID with task-pending-status --task-id FULL_ID --json. These bounded read-only views preserve source uncertainty; cancellation support describes a mechanism and grants no permission. See the pending launch contract.

harflow-ctl backend-models --backend NAME --json (direct callers only) lists the models one installed harness says is selectable: an advisory, user-scoped snapshot from the harness's own output, cache or configuration, never a model call. A source that cannot be read is reported as unavailable with a reason, not as an empty list. See the backend model listing contract.

While bounded reads are still establishing caller authority, preparation responses expose only neutral status, source and reason, with empty content and unknown counts. This also applies to a cold index for a direct caller; retry until authority is established. See bounded read authority.

After a dispatch server restart, surviving execution is reported as a quiet observation change; lost or uncertain owner/capture evidence remains visible. Full diagnostics retain the original dispatcher identity. See supervision. For stable read-only parent-process observation continuity, use harflow-ctl status TASK_ID --observer-parent --json (also supported by status-batch); see public contracts.

Builders support explicitly requested conversational turns through ctl and agent MCP steering. A prose reply waits for another caller request; a valid framed proposal remains subject to draft revision checks and explicit Apply/Save. This requires the qualified original external caller or a verified native human and a supported finite harness cap. Ordinary builder messages keep their existing behavior. See builder steering. Orchestrators also support safe-boundary conversation with exact decision revisions: prose waits, and only a framed, validated configured action can resume execution. Already issued work and active sibling results remain real. See orchestrator steering.

Qualified workers support one finite response per explicit caller message, with their actual configured permissions and real tool effects. Steering does not consume or reset normal execution attempts. Epoch-scoped replay and bounded retention require an explicit protocol upgrade; old receipts may expire with visible history gaps. See worker steering and bounded history.

Root connected workers configured headless in fixed Fresh mode also support exact prestart withdrawal and a linked same-assignment retry. A spawn race stays unknown; the operation never authorizes a late signal or poststart replacement. See prestart worker replanning.

Workflow callers can see every pending child question in status and wait replies and answer them independently by decision ID through the root run. Questions and structured clarification items remain complete, and forwarded answers return a durable child acceptance receipt. Resolved attention reasons disappear when execution resumes; unreadable workflow approval metadata is reported separately from requests needing a decision. See workflow input and recovery.

Permission features use cached, binary-bound qualification: measured versions seed the cache, and unseen versions run isolated no-paid behavior probes before use. harflow-ctl qualify <backend> explicitly reruns the probes; cached discovery reports per-feature results. Add --qualification-only to permission-preview or workflow-preview NAME to discover only the features requested by that launch without provider self-tests; qualify --feature FEATURE is repeatable. Ordinary permission previews may qualify requested features. Automatic probes currently require macOS isolation. See qualification.

Current seed measurements for these two features: allowed_commands is qualified on Claude Code 2.1.310 and 2.1.312 and Vibe 3.0.3 on macOS through ACP; caller approvals are qualified on Claude Code 2.1.302 (Bash approvals) and 2.1.310/2.1.312, and on Codex through codex app-server for codex-cli 0.163.0 on macOS only (commands, and patches with caller_write_approvals), and on Vibe 3.0.3/macOS through vibe-acp (Bash and file reads; writes/edits with caller_write_approvals); other backends refuse them. Approvals are not available to native workflow children, and a request unanswered after 1800 seconds (or at the node's attempt deadline) is rejected by Harflow, never approved. After a denial there is no approve-later path: recovery is always a new resume_task or continue_task execution guided by denial_remedy (allowed_commands covers only Bash approval_required and chained-command parts; a denied Read, Write or Edit needs a resumed run so the agent can raise a fresh request; a deny_rule cannot be lifted by grants). Workflow permission-grant retry remains unavailable. On compatible engines the Mac Monitor can answer caller-owned requests; authority follows the existing inferred, cooperative same-user model and does not authenticate a human or the app. See harness permissions.

Vibe 3.0.1 and 3.0.3 headless dispatch use its Rust CLI and the ask approval profile for read_only. This is an approval policy, not a write-tool exclusion: inherited policies or custom profiles can pre-approve writes. The retained VIBE_CLI=python selector is ignored by Vibe 3; interactive takeover inherits the user's environment.

Vibe permission results retain structured tool refusals and the scopes requested by approval callbacks. Known refusal shapes distinguish approval requirements, policy denials and denylist rules; unknown reasons remain unclassified. Vibe 3.0.3/macOS uses a qualified ACP transport for caller approvals, allowed_commands and explicit configured-model selection. Requests and responses are bound to the exact tool input; grants never replace the native allowlist or override native deny policies. Ordinary launches without these options retain the established headless transport. See Vibe permission denials.

Vibe provider HTTP 402 failures retain a safe explanation even without final agent prose. A measured usage-limit response is reported as a usage limit; an unknown payment response stays a provider error and asks you to check billing and usage. Neither automatically retries or switches providers.

publish authorizes publication attempts; its enforcement depends on the backend:

Backend

Publish mechanism

Claude

Allows git commit, git push, gh pr create/edit/view/comment/review/checks/diff/list, and gh repo view, including their --help forms.

Codex

Requests network enabled in its workspace sandbox; it does not restrict individual GitHub commands.

opencode

Uses the same build policy as write_in_repo; inherited harness settings still decide command approval.

Vibe / Antigravity

Uses the same approval bypass as unrestricted; individual GitHub operations are not filtered.

Cursor

Uses the same print-mode command as write_in_repo and unrestricted. Plan mode is requested only for read_only. Individual GitHub operations are not filtered, and caller approvals and allowed_commands are refused.

Claude's built-in list excludes merge, repository deletion, releases and raw gh api calls. Its prefix matcher cannot safely distinguish read API calls from writes; use gh pr view --json or gh repo view --json for supported reads. These are Harflow-supplied command grants, not an OS Git sandbox; inherited settings and hooks can still allow or deny commands. Permission previews expose the actual mechanism and caveats. See publication permissions.

Version 0.0.10 is a pre-release candidate. Harflow, the companion macOS application, is maintained separately and prepares its own exact paired engine runtime. Its managed runtime and MCP registrations work independently of the app process; see the managed runtime guide.

Task phase slots can serialize heavy commands while code-writing tasks overlap. Explicit human enable, durable FIFO leases and optional conservative host cleanup are documented in phase slots; Monitor queue UI remains outstanding. Phase operations distinguish a disabled layout with the stable error code phase_slots_not_enabled; see the phase slot contract.

Detached task owners preserve output capture and live input across MCP server restarts. Tasks can take turns on a named, exclusive resource (a simulator, a device, a database) with resources; a waiting task is acknowledged at once and reports waiting_for_resources until it spawns. A task can also run in its own linked Git worktree with worktree, leaving your checkout untouched. Workflows can declare run and node resource scopes and share one root-run worktree across nodes and linked child runs. See resources and worktrees. Final review summaries and workflow plans receive task-identifiable files discoverable through task artifacts, including read-only runs. Public harflow-ctl task-artifacts reads use the enveloped v1 contract and require task-artifacts.v1; pages distinguish empty registrations from unavailable metadata and expose cursor/preparation error reasons. See the public artifact contract. Child workflows receive pinned parent specifications throughout their nodes. Every task also gets scratch folders shared across its resume chain and its group (HARFLOW_CHAIN_SCRATCH, HARFLOW_GROUP_SCRATCH), so outputs survive between runs; see shared scratch.

Confirmed-dead detached launches reconcile interruption evidence and resource/session claims during maintenance or resume admission. Missing or uncertain process generations stay protected; one damaged launch receipt reports a per-task refusal while unrelated discovery continues. Human launch-settle uses the same death checks. See abandoned launch recovery.

Non-question workflow continuation can bind the originally displayed attention_checkpoint_id; Monitor requires capability workflow-attention-checkpoints.v1 and this token for resume/recovery. Stale requests refuse the answer and grants; refresh and review before resubmitting. Questions retain their decision-ID path. See checkpoint contracts.

Workflow scheduler recovery is explicit; see supervision and recovery. If a decision cannot be encoded for persistence, scheduling stops with needs_attention and an error in attention_reason. After correcting the cause, resume the run to retry the retained decision. An interrupted active run with a confirmed-dead scheduler instead uses recover_workflow; see workflow recovery. Task status distinguishes the dispatching server, execution owner and responding server. A normal attachment to a task launched by this server is not recovered; another observer or missing identity is explained explicitly. Detail reads separately report dispatcher liveness, and routine status polling provides a successor reference without scanning history. See supervision and recovery. Git outcomes observe up to eight repositories, including explicit absolute observe_repos targets and repositories discovered from structured commands and edits. Observation grants no additional access. Outcomes retain partial evidence with per-probe failure and budget diagnostics. Commit ranges include imported history and cannot identify task-created commits or authorship; see observed task outcomes. Task observations retry transient metadata replacements up to three reads and retain uncertainty when metadata cannot be read reliably. Recovered tasks disclose owner/process uncertainty and capture continuity. Qualified Claude transcripts can supply bounded display-only recovery activity; see public contracts. Live-input capability does not promise that stdin is still open: status reports input_channel and input_closed_reason. Wait for settlement before resuming a task whose input has closed. MCP task status exposes paged successor links; resumes and continuations retain their source IDs. Claude permission previews and launches disclose bounded candidate inherited rules; managed policy and effective applicability remain uncertain. See harness permissions. Claude read-only plan mode permits built-in plan files; successful observed plan writes appear as metadata-only task artifacts. Harness session history and logs can also persist outside the checkout. See harness permissions. New launches and resumes require at least 256 MiB free on state, checkout and temporary-storage filesystems. Confirmed-dead detached executions can resume their recorded conversation; live or uncertain sessions remain protected. See supervision and recovery. Backend discovery reports qualification gates for writable paths, caller approvals and command grants, with network caveats returned as complete entries. At unrestricted access, validated extra writable paths are disclosed as a no-op. Waits return for approvals that still need a decision or require reconciliation; a recorded approval or rejection awaiting delivery does not by itself interrupt the next wait. Live background wait bounds are persisted and configurable; see task continuation.

Use harflow-ctl version-info --json to inspect runtime identity and compatibility without initializing state. Engine operations require compatible Harflow state, task metadata, saved workflow definitions, workflow run documents and workflow ownership receipts. Known qualified storage lines migrate conservatively before new-line writes. Use harflow-ctl state-inspect --json to inspect an incompatible root without changing it, then explicitly confirm its state-recover proposal to retain a sibling backup and create fresh state. HARFLOW_STATE_ROOT can also select a separate fresh state directory; see state ownership and recovery for compatibility requirements.

Root workflow status and waits retain verified nested questions with their full source paths and usage-limit details, even when another child link is unavailable. Answers route by the current decision ID; unavailable decisions report specific retry guidance. Pending workflow questions, recovery and goal revision are answerable by both the qualified original caller and a verified human Monitor responder. The first valid answer wins, with its text, responder and time retained; answering in Harflow does not transfer ownership. Child questions still route through the root. Unknown caller identity retains conservative eligibility. The Mac app gates shared answering on the engine's advertised responders field. See the interaction contract.

History pages expose optional completion and ownership metadata for retained-history summaries. Workflow completion time records the terminal status transition independently of settlement; legacy and mixed-writer completion without a matching sequence witness remains unknown. See compact reads for ownership, pinned workflow identity and completeness requirements.

Finished retained-history statistics are available to verified direct callers through harflow-ctl statistics-page --since=<ISO8601> --before=<ISO8601> --json. Clients require capability statistics-page.v1; older engines remain unsupported. Results disclose retention, missing accounting and bounded preparation rather than assuming complete history or zero usage. Executions also report the backend-reported dollar cost and the model the harness observed (capability statistics-cost-model.v1; unknown stays null, never zero). See statistics contracts.

Verified direct callers can read one task's history through ctl: harflow-ctl task-events TASK_ID --json pages its normalized events in both directions with opaque cursors, a lifecycle log.state and gap reporting (capability task-event-page.v1), and harflow-ctl task-prompt TASK_ID --json returns its stored prompt with an integrity state (capability task-prompt.v1). Clients require the capability on the version-info handshake before using either command. See task event pages and prompts. harflow-ctl task-list-page --predecessor-task-id TASK_ID --json lists a task's recorded resumes and continuations (capability task-successors.v1; see successor discovery). A verified direct caller can also read the activity of a running workflow node with harflow-ctl workflow-inspect --view activity (capability workflow-live-activity.v1; see live node activity). harflow-ctl task-changes TASK_ID --json returns the repository differences captured when a task settled (committed range and working tree, bounded rows and patch text; capability task-changes.v1; see stored task changes). The text can contain secrets or uncommitted edits, so only verified direct callers can read it.

harflow-ctl continue TASK_ID [--extra-prompt TEXT | --extra-prompt-file PATH] --json starts a fresh session from a settled standalone task and consumes its queued follow-ups (capability task-continue.v1; see continue).

Ctl full/brief status and batch rows expose advisory chain-stop observations with task-continuation-stop.v1 in the fresh version-info handshake. stopped, not_stopped and unknown describe the marker observation, never launch eligibility; successor reconciliation still uses task-successors.v1. See the continuation-stop contract.

harflow-ctl task-list-watch [--cursor C] [--wait-seconds N] --json is one bounded task-list invalidation wait (capability task-list-watch.v1; see task-list invalidation wait). It returns baseline/changed/timeout/reset/unavailable signals, not task facts; public paging and status remain authoritative. Direct callers only; it never initializes a missing state root. Watch continuity requires corrected producer writers (0.0.10); concurrent older writers are unqualified and may not invalidate the watcher. Consumers must retain public deadline reconciliation.

For narrowly authorized branch preparation on qualified Claude Code, exact allowed_commands grants for fetch, fast-forward-only pull and non-force branch switching/creation work at write_in_repo as well as publish. Initial transitions refuse dirty checkouts without stashing or resetting; commit/push authority remains separate. An exact git commit --no-edit or git merge --continue grant is the one carve-out: it is usable only while a merge is in progress. enforcement.local_commit says whether a direct local commit is denied, allowed, or not enforced. Harflow can also fetch, and can create one branch from a fetched base, before the agent starts. See the grant grammar and per-run workflow migration. Other backends explicitly refuse command-grant requests rather than silently broadening access.

Headless runs configure a GitHub SSH-to-HTTPS prefix rewrite for Git processes that preserve the injected configuration; see Git transport for overrides, authentication and limitations.

Ordinary Codex exec inherits user and trusted project configuration, allow rules and MCP servers. Read-only and network-disable pins do not establish effective confinement; permission reports return conservative guarantees. Workspace-write may persist project trust. See harness permissions.

See the Changelog for change history.

Licensed under Apache-2.0. Git history preserves source authorship; the license notice does not assert ownership of prior contributions.

Read-only reviewers can opt in to a qualified group-scoped report output directory with group_report_output: true and a nonempty group (--group-report-output in harflow-ctl). The initial supported configuration is headless Codex CLI 0.165.0 on macOS with network disabled and compatible execution configuration; unsupported combinations fail explicitly. The profile requests read-only repository access; effective confinement is not established for all inherited rule authority. See shared scratch and review reports.

Messages to tasks, workflow runs and workflow nodes queue by default, preserving exact text and order. Use send_message(..., delivery="now") or harflow-ctl send TASK TEXT --delivery now to request immediate continuation; unsafe interruption returns a reason and leaves the message queued. See queued messaging. The negotiated conversation delivery contract defines automatic response-boundary Queue and native Now. Its qualified launch profiles are separate from legacy follow-up messages.

Available Tools

63 tools
acquire_slotA

Acquire a task-owned phase lease around heavy commands. Returns queued immediately when blocked; retry the same name every two seconds to observe a grant. Queue budget is 0..21600 seconds, never a held-lease timeout. Release lease_id on every exit, including queued exits. Phase slots require human enable and a verified task caller; they never borrow ancestor holds. Disabled layout returns error data.code phase_slots_not_enabled; other refusals remain distinct.

Inputs: name (required), wait_seconds. Returns: object

apply_workflow_draftA

Publish a preview from the verified active builder task; never write a saved workflow.

Positions are top-left logical points, with finite x/y >= 0, on a 10-point dot grid. Agent nodes are 200 x 92 points (reserve 20 x 10 grid cells); Start/End are 72 x 72 (reserve 8 x 8 cells). Leave at least 40 points (4 cells) between node edges; no overlaps. Use routing_mode="explicit". Ordinary outgoing paths are exclusive alternatives. Parallel execution requires paired parallel_start/parallel_end structural nodes with a shared parallel_group_id; every branch must reach its matching end. Parallel start defaults to branch_selection: "all". With branch_selection: "orchestrator", the orchestrator selects applicable issued branch continuations, assigns each selected entry through branch_assignments, and records a non-empty selection_reason explaining selections and exclusions before dispatch. Optional selection_guidance advises that choice. Selected branches may contain multiple steps and properly nested groups; convergence uses the frozen selected membership, including singleton selections. Preserve existing node positions exactly unless the user explicitly asks to move or rearrange them. The canvas expands automatically; do not constrain nodes to a fixed viewport.

Inputs: definition (required), expected_draft_revision (required). Returns: object

cancel_queued_messageA

Withdraw a still-queued task or workflow-owned message; claimed messages are refused.

Inputs: task_id (required), message_id (required), interaction_owner. Returns: object

cancel_taskA

Stop a running task, terminating the agent and any processes it spawned, and cascade the same stop to any live descendants this bridge can find.

Args: task_id: Identifier of the task to stop.

A launch still waiting for resources is stopped before it starts: the request is recorded, its owner honours it at the next poll, and pending descendants are asked to stop too (cascade.pending_cancel_requested).

Already-finished tasks are returned unchanged. Work the agent had already written to disk is left in place. Tasks started by an earlier harflow_mcp server process can be stopped too, via their recorded process group.

The cascade reaches nested dispatches that task's own agent made through harflow_mcp — spawned_by/root_task_id lineage, best-effort, not a sandboxed guarantee — and the response carries the result as cascade: cancelled_descendants (ids now cancelled), sigkill_survivors (ids that resisted even SIGKILL), owner_still_settling (ids belonging to a still-alive bridge server that has not settled them yet), not_signalled (ids that could not be signalled at all, with why), and not_recorded (ids that were signalled but whose cancelled status could not be written, with why — their records are left untouched).

Inputs: task_id (required). Returns: object

cancel_workflowA

Stop root scheduling and cascade cancellation to associated tasks and children.

A cancellation request returns cancelling until settlement is observed; unresolved dispatches or cancellation transport errors return needs_attention. Child runs must be controlled through their root workflow run. Human Monitor cancellation uses the local CLI verified-human boundary; it does not transfer the original caller's answer, retry, or continuation ownership.

Inputs: workflow_run_id (required). Returns: object

cancel_workflow_messageA

Cancel one queued workflow message. Delivering and delivered messages cannot be withdrawn.

Inputs: run_id (required), message_id (required), interaction_owner. Returns: object

commit_conversation_resultB

Explicitly request a capped same-session workflow result after conversation.

The source must physically exit and drain first. The request includes the exact conversation witness and a complete existing steering open request with allow_fresh_context=false. Only the issued framed commit can advance the graph or propose a draft; applying/saving a draft stays explicit.

Inputs: request (required), interaction_owner. Returns: object

continue_taskA

Start a fresh session from a conclusively settled standalone task.

This differs from resume_task: it reconstructs the original assignment, latest summary and captured outcome, with optional UTF-8 notes and caller follow-up preserved verbatim. Oversized evidence is referenced by path. Backend, model and access settings are retained. Process exit, complete output drainage and a durable terminal record must be observed; old or inferred records without settlement evidence are refused. Workflow-owned tasks use workflow recovery. Concurrent identical retries share one successor; mismatched or unsettled reservations fail. A source that had resources re-queues the same names; while they are busy the successor is acknowledged with launch_state: "waiting_for_resources" (the reservation is accepted, and a retry returns the same pending successor). The returned continuation_of_task_id is separate from session resume/delegation ancestry.

Follow-ups queued on the source with send_message are consumed by this call: they appear verbatim, in queue order, ahead of extra_prompt (or ahead of a fixed closing line when there is none), and the new task's task_started event lists their message_ids. With nothing queued the call behaves exactly as without the feature. Two manual calls with the same extra_prompt and notes are the same request whatever is queued: the queue is read once, when the successor is reserved, and a retry returns that successor. An automatic continuation never consumes.

group_report_output: omitted or null inherits the saved opt-in; false disables scoped output. allowed_commands: omitted or null inherits the source task's saved command grants (an automatic continuation always does); a list replaces them after the same validation and nested-subset check as start_task. See start_task for the grammar and limits. fetch refreshes remote-tracking refs before the fresh session, the same way as start_task. Continuations reuse a branch prepared at the original dispatch and do not accept branch or base.

Inputs: task_id (required), fetch, notes_path, extra_prompt, +5 more. Returns: object

control_conversation_messageA

Cancel an unclaimed message or promote it to Now without duplicating input.

Use a distinct control request UUID, the existing message_request_id and the exact current conversation witness. Promotion preserves the message's original Queue admission identity. Cancellation never interrupts an issued response.

Inputs: request (required), interaction_owner. Returns: object

delete_workflowC

Delete a qualified definition after scanning qualified referrers; historical snapshots remain available.

Inputs: name (required). Returns: object

followup_workflow_builderA

Queue a message in the same workflow-builder conversation without saving its draft.

Keep node and connection instructions concise and task-specific. HarflowMCP owns runtime retries, budget enforcement, configured fallback dispatch and user interaction; use existing configuration fields for limits and fallback candidates, and orchestrator needs_input for clarification or approval. End means intentional workflow termination, not waiting for user input. Preserve legitimate task branches and revision loops.

Preserve spaces and word boundaries in prompt rather than compressing natural prose; the caller's source text is retained unchanged before builder input assembly. Restarting an idle or completed builder sets the run's resumed_at; feedback queued to a running builder does not.

Inputs: prompt (required), run_id (required). Returns: object

get_approval_requestB

Read the complete exact action for an authorized direct caller.

Inspect this payload before approving; request IDs, digest and revision are comparison fields, never authorization tokens. Payloads may contain sensitive command arguments.

Inputs: task_id (required), request_id (required). Returns: object

get_task_artifactsA

Page at most 50 artifact references with current stat observations, not content verification.

Verified human callers can inspect a known standalone or workflow-bound task; task callers can inspect only self. Workflow-bound items carry a workflow binding. Builders and inherited descendants are refused (use get_workflow_artifacts for run-level reads). Cursors are task-bound and reject manifest changes. Availability is available/deleted/changed/unavailable at observed_at; available does not establish unchanged contents. Missing legacy manifests are empty; corrupt ones unavailable. Caller indexing is bounded; retry a catalog-preparation error to advance cold history.

Inputs: task_id (required), limit, cursor. Returns: object

get_task_event_pageB

Read one bounded recent or older activity page using an opaque stable cursor.

Defaults to 100 records; each call reads at most 1 MiB plus integrity anchors and returns at most 256 KiB. Pass next_cursor for exactly one older page. Append-only live growth preserves the historical snapshot. Replacement or truncation requires reloading without a cursor. Filtering can return an empty page with has_more true. An indexing response exposes no task events; retry after the bounded legacy catalog bootstrap advances.

Inputs: task_id (required), kinds, limit, cursor. Returns: object

get_task_eventsA

Fetch normalized events from a task's event log.

Args: task_id: Identifier of the task whose events to read. limit: Maximum number of events to return, capped at 200. Default is 50. before_seq: Exclusive upper bound — return events with seq < before_seq (older events). Cannot be used with after_seq. after_seq: Exclusive lower bound — return events with seq > after_seq (newer events). Cannot be used with before_seq. kinds: Optional filter by event kind. Must be a non-empty list of known kinds from task_started, assistant_text, assistant_delta, tool_call, tool_result, user_message, usage, notice, task_finished, undelivered. assistant_delta is excluded by default unless explicitly listed. Pass null to get all kinds except assistant_delta.

Returns events in oldest→newest order within the page, with:

  • events: list of event objects with their seq, kind, and data fields

  • has_more: true if there are more matching events in the requested direction

  • next_before_seq: the seq of the oldest event in this page (for paging older)

  • next_after_seq: the seq of the newest event in this page (for paging newer)

  • skipped_oversized: count of lines > 1 MiB that were skipped (not parsed, not counted as events)

For the complete final summary/report, use get_task_status in compact or full detail; event pages are bounded and are not a lossless final report read.

Each returned event has its long string fields truncated to 2000 chars, lists to 50 items, and dict nesting to depth 4, with "truncated": true added if anything was cut. An event still over 16 KiB after that (a very wide dict) is replaced by a stub carrying only seq, kind, observed_at, truncated: true, oversized: true and its size in bytes. A page stops early once its serialized size would pass 256 KiB (has_more remains true, cursors still valid). A page is never empty while has_more is true.

Default (no before_seq/after_seq): newest page — the most recent events. Both cursors cannot be used at once. kinds=[] or an unknown kind raises INVALID_PARAMS.

Inputs: task_id (required), kinds, limit, after_seq, +2 more. Returns: object

get_task_notificationsC

Read bounded subscription delivery states; this never establishes task success.

Inputs: task_id (required). Returns: result

get_task_statusA

Report a dispatched task's current state without blocking.

Args: task_id: Identifier returned by start_task or resume_task, or a unique prefix of at least 8 characters; a prefix reply carries resolved_from. include_tail: If True, include the full last_output_tail (20 lines × 2000 chars each); if False (default), the tail is omitted for running/completed tasks and shortened to 5 lines × 500 chars for failed tasks. The caller can request the full raw stream log path from raw_stream_log in full detail for complete output, or use get_task_events for normalized events. brief: Compatibility alias for detail="compact"; preserves the complete summary. include_tail=True still explicitly requests the full tail. detail: "compact" (default) omits static execution metadata and detailed outcome probes; "full" returns complete MCP status. Both retain the complete summary/report, approval attention, failure diagnostics and recovery uncertainty. include_successors: Fetch the first authorized page of successor IDs. Defaults false: ordinary polling includes a detail reference without scanning retained task history.

A task still waiting for its resources has no record yet: it reports status: "running", launch_state (waiting_for_resources, granted, uncertain, or not_started once it settled without starting, with not_started_reason) and resources (names, queue position, blocked_by, deadline). See docs/resources-and-worktrees.md.

Full detail returns the task's status, summary, enforcement, and recent_activity — a list of ≤ 5 one-line strings describing the most recent meaningful events (tool calls, failed tool results, assistant messages, notices). For running tasks this gives a live summary without the bulk of the raw stream. These lines deliberately collapse whitespace and truncate to stay short — they are a summary only; the stored event log (see get_task_events) and every stored or delivered message keep their original text intact. total_cost_usd is null for backends that do not report cost — Codex, vibe and Antigravity report tokens only or nothing (vibe reports neither cost nor tokens nor a turn count).

enforcement states what the run's restrictions actually amounted to, and mcp_servers (where the backend reports them) shows what the agent loaded. owner identifies execution/output capture; dispatch_origin and dynamic responding_server distinguish the requester from this reader. observation_mode is owner, attached, recovered or unknown. A same-origin normal attachment reports recovered: false; another reader or missing process-generation evidence reports true with an explanation. PID differences alone do not establish owner loss.

Live, recovered and brief snapshots include artifact_summary with a bounded count and state (available or unavailable). Supported standalone owners may include detail_ref: {"tool": "get_task_artifacts", "task_id": "..."}, for explicit paged metadata reads. Unsupported or unverifiable ownership returns unavailable without a detail reference; a supported owner with an unreadable manifest may retain the reference for diagnostics. Artifact registration is a reference, not proof of valid contents, successful execution, or permission to copy or publish. Availability does not verify content integrity.

parent_task_id links a resume to its source; continuation_of_task_id links a new-session continuation. successor_tasks derives the reverse links from retained, authorized headers, when include_successors is true; otherwise only a detail reference is returned. Incompleteness and pagination are explicit. These links do not transfer reminders or subscriptions to the successor.

Confirmed usage limits add failure_diagnostic (category, reason, source, and optional provider-supplied reset_at). It is retained during process settlement and after failure; a running status during settlement does not authorize a replacement dispatch.

Terminal outcome records starting and ending Git observations and diff statistics. new_commits means newly reachable from the observed comparison base, including imported history; task-created commits and authorship are unavailable. Branch/HEAD are endpoint observations only; intermediate transitions are unobserved even when endpoints match. It also records local upstream comparison, optional bounded phase/probe diagnostics and partial-result status, and best-effort structured tool evidence for external file writes and the last build/test command. Missing evidence is null, including pushed state without observed publication evidence. These shared-repository observations do not establish task authorship or goal completion. Old records without captured outcomes return null.

Inputs: task_id (required), brief, detail, include_tail, +1 more. Returns: object

get_workflowC

Read a saved workflow definition and revision.

Inputs: name (required). Returns: object

get_workflow_artifactsA

Page artifact references registered by the attempts of a workflow run and its linked child runs.

References are metadata only (path, kind, note, a stat observation); nothing is read, copied or validated. Each item carries workflow (run, node, execution, role, attribution) and current availability. execution_id selects one node execution; a native subagent has no channel of its own, so references its controller registered appear under that execution with attribution: native_transport. owners lists only owners whose references could not be read (unavailable, record_removed, run_unavailable). state: unavailable with reason catalog_preparing or catalog_stale means retry; tree_bound_exceeded (over 64 runs) is final. Page with next_cursor (positional, so owners appended behind it appear only on a new pass). Authority: a verified human reads any run; a delegation orchestrator reads its own run and linked descendants; workers, native transports, builders and standalone task callers are refused (a worker reads its own task with get_task_artifacts).

Inputs: workflow_run_id (required), limit, cursor, task_id, +1 more. Returns: object

get_workflow_notificationsB

Read root workflow subscriptions and at most 50 recent delivery states; direct callers only.

Inputs: workflow_run_id (required). Returns: object

get_workflow_run_detailC

Losslessly read executions, decisions, checklist, technical_plan, definition, owner_contracts, builder_draft, generated_definition, question, reason or wait_reason.

owner_contracts contains the pinned per-owner permission plan. Concatenate chunk fields then decode JSON. Cursors bind content, run and view; changed content requires restarting. On-demand detail views: on_demand_nodes (configured owner-scope catalog), on_demand_calls (chronological reservation/call records), on_demand_state. Calls include source scope, checkpoint/origin, timing, result_ref and nullable task_id. Managed orchestrators use settled node inspection for executions.

Inputs: view (required), workflow_run_id (required), limit, cursor. Returns: object

get_workflow_statusB

Read a workflow run's execution state and task associations.

Child runs of Run workflow nodes report their parent and root links, orchestrator mode and session owner, input source, tree settling state and per-execution child invocation status. Public controls on a child id are refused with the root run id. Resolved attention reasons are omitted on active runs. Workflow approval read failures appear as bounded approval_summary.read_errors, separately from known pending or uncertain approvals. interaction_state reports qualified caller liveness, advisory human Monitor availability and any persisted handover audit. Unknown caller identity never authorizes handover; server death alone is insufficient. resumed_at (Unix seconds) appears once the caller has resumed or answered the run. fields selects reply keys (workflow_run_id, status, created_at and updated_at are always included; while the run needs_input its question fields stay). Values equal the unprojected reply, which is read first, so derived status and managed-caller summaries are unchanged.

Inputs: workflow_run_id (required), fields. Returns: object

get_workflow_steeringB

Read exact builder, orchestrator or qualified worker targets, revisions, holds and retained history windows.

Only the qualified original external caller or verified native human is eligible. A managed worker, builder or orchestrator has no parent/sibling steering authority. Reading issues no turn.

Inputs: workflow_run_id (required). Returns: object

get_workflow_steering_historyB

Read a bounded ordered steering history page; cursors never authorize a mutation.

Reconnect by reading the original receipt rather than resending a conversation after response loss while that receipt remains retained. Expired epochs refuse; history exposes gaps rather than promising lifetime replay. A new external generation cannot claim earlier ownership.

Inputs: workflow_run_id (required), limit, cursor. Returns: object

inspect_workflow_nodeA

Inspect any fully settled node execution in your workflow, including older executions.

Result view returns lossless JSON text chunks: concatenate chunk fields until next_cursor is null, then decode JSON. Pass next_cursor back as cursor. Default payload contains the normalized node_result, full raw_output, permission_denials, and optional_skip consent metadata when present. Selecting task_id reads a specific fallback attempt. Activity uses normalized events with before_seq/after_seq. Result limit is characters (default 16000, max 32000); activity limit is events (default 50, max 200). No live or uncertain execution can be inspected. Orchestrator inspect decisions may name a linked child run through workflow_run_id, authorized only by a verified parent chain.

Inputs: execution_id (required), workflow_run_id (required), view, limit, +4 more. Returns: object

list_approval_requestsA

List bounded permission request metadata for exactly one task or root workflow tree.

Default page size 16, maximum 32. Raw actions appear only in get_approval_request. Workers and orchestrators cannot inspect caller approval records. A pending request is an interaction substate; underlying execution remains running. No approval is inferred from agent prose, errors or already denied actions.

Inputs: limit, cursor, task_id, workflow_run_id. Returns: object

list_backendsA

Report the available agent backends, what is installed, and what each can actually do.

Worth calling before start_task if the choice is not already obvious. Each entry carries its capabilities (turn cap, cost reporting, OS sandbox, per-command deny, whether we can choose the session id) and, for every freedom level, the enforcement it really delivers. Ordinary script entrypoints retain version discovery and native eligibility checks. Extra-path qualification separately rejects selected scripts before version execution. capabilities.extra_writable_paths reports bounded support, certification and refusal reason; capabilities.allowed_commands and caller_approval_support report their qualification gates. At unrestricted freedom, extra_writable_paths is a validated, disclosed no-op, not a bounded grant.

Inputs: no named parameters. Returns: result

list_task_pageA

Stable newest-first persisted task headers; inspect a task for reconciled status/output.

bootstrap_pending indicates bounded indexing or requested-header refresh is preparing. Preserve loaded headers and cursors while catalog_state reports preparing. Active-only pages are a separate inventory and do not reorder history cursors. predecessor_task_id selects direct resumes and continuations of that task, for following successor links without scanning all retained history. Combine it with the returned cursor.

Inputs: limit, cursor, task_ids, session_id, +2 more. Returns: object

list_tasksA

List dispatched tasks, oldest first.

Args: status: Optional filter — running, completed, failed, timed_out or cancelled. backend: Optional filter by harness, e.g. "codex". waiting_for_resource: Optional resource name: only launches that have not started and are still queued for it (launch_state: "waiting_for_resources"). Uses the unpaged listing.

The unpaged listing also carries launches that are waiting for resources and have no task record yet (pending_launch: true); the indexed page does not.

Includes tasks from earlier harflow_mcp server processes, marked recovered: true. Supplying group/title_contains/repo/since/limit/fields/cursor selects a bounded newest-first indexed page (default limit 50, maximum 100), rather than the legacy oldest-first list. since is an inclusive ISO8601 timestamp with timezone. fields selects compact names. Accepted fields, in sorted order: background_idle_seconds, backend, dispatch_origin, duration_seconds, finished_at, group, input_channel, last_captured_output_at, needs_direct_lookup, needs_reconciliation, note, observation_mode, observation_note, observed_exit, output_capture, owner, parent_task_id, persisted_status, process_identity_state, recovered, repo_path, responding_server, root_task_id, session_id, started_at, status, task_id, title. The repository field is repo_path, not repo. Identity and status fields are always included: task_id, status, needs_reconciliation, needs_direct_lookup, persisted_status, observed_exit, process_identity_state. An unknown name, an empty list, a non-string entry and a list longer than the accepted set each produce their own error, and the error names the bad entries and lists the accepted ones. Accepted filters: group, title_contains, repo, status, backend, since, predecessor_task_id. Filters run before pagination; cursor binds filters. Status is the indexed observation: inspect needs_reconciliation and observed_exit before interpreting it. See docs/compact-task-reads.md for supported fields, bounded-header matching and direct detail lookup. Listing never replays task logs. When status_reconciliation_pending is true, results are incomplete: retry the same filters without a cursor as directed by polling_guidance, even if has_more is false.

Inputs: repo, group, limit, since, +6 more. Returns: result

list_workflow_run_pageA

Stable newest-first run headers, with bounded ancestor/session-owner lookups.

Deferred explicit run_ids and ancestor reads report preparation; preserve loaded headers and retry the read. Oversized or unsupported metadata reports blocked diagnostics with incomplete counts, without publishing unknown placeholder outcomes. A header's optional resumed_at (Unix seconds) is the caller's last continuation; it is absent if never resumed, unlike updated_at, which changes on every write.

Optional filters narrow the page: workflow_id (stable workflow identity), repo (exact recorded repo path), status (list of run statuses: pending, starting, building, running, pausing, paused, needs_input, needs_attention, cancelling, completed, failed, cancelled; the indexed status shown on each item), since (inclusive) and before (exclusive) ISO8601 created_at bounds with timezone, title_contains (case-insensitive run name text) and scope (all, the default; root; nested child runs). Runs have no group, so there is no group filter. Filters cannot be combined with run_ids or related_run_id. A filtered page examines at most 2000 catalog rows after its cursor and never computes a filtered total (total_active_count is null). When that window ends before the page fills, the reply has scan_incomplete true, any matches so far, and a next_cursor after the last examined row: keep calling with it until has_more is false. A cursor is bound to the filters that produced it. fields selects item keys (workflow_run_id, status, created_at and updated_at are always included; while a run needs_input its question fields stay); values equal the unprojected reply.

Inputs: repo, limit, scope, since, +9 more. Returns: object

list_workflow_runsB

List recorded workflow runs. Each carries resumed_at once the caller has resumed it.

Inputs: limit, offset. Returns: object

list_workflowsA

List name, description, revision and workflow_id without graphs/instructions by default.

Use get_workflow(name) for one complete definition, or detail="full" for all definitions. Incompatible or unavailable sources refuse the whole list in either mode.

Inputs: detail. Returns: result

pause_workflowC

Stop scheduling while active steps settle.

Inputs: workflow_run_id (required). Returns: object

prepare_task_conversationC

Prepare a qualified same-conversation delivery target and its exact witness.

This explicitly enrolls a qualified task. It does not send input or enable an unsupported transport. Use the returned expected witness in the negotiated conversation_delivery_v1 request; legacy queued follow-ups stay separate.

Inputs: task_id (required), interaction_owner. Returns: object

preview_task_permissionsA

Preview standalone task permissions without launching an agent or allocating scratch.

With qualification_only, returns only the cached qualification requirement plan before provider self-tests, path certification or owner checks; launch still validates those gates. Empty required feature sets need no binary inspection.

Uses the same bounded extra_writable_paths validation, installed-version checks and detected owner caps as start_task. Returns requested/effective typed paths, certification and truthful enforcement. Writable scratch-aware launches disclose future task, chain and group scratch symbolically in writable_roots without allocating them; read-only previews have no scratch root. The preview is an observation, not a reservation: launch revalidates paths and configuration. Extra grants never authorize publication. Workflow/native-adapter grants and unverified harness configurations are unavailable. Known external backend execution configuration is protected; unsupported existing inputs reject requests. Existing repository configuration authority retains its baseline limits. Grants authorize output writes, not trust in that output as a future repository, hook or executable. Startup inputs are checked, not atomically pinned against independently authorized concurrent writers; see docs/extra-writable-paths.md.

group_report_output opts in to a qualified read_only run whose sole writable root is its concrete canonical group folder (group is required or inherited). No folder is allocated. This excludes caller approvals, native children and extra writable grants.

allowed_commands is validated exactly as in start_task (grammar, installed backend version, nested-subset cap) and the returned enforcement lists it as extra_allowed_commands. branch, base and fetch are validated the same way as start_task and shown as dispatch_git without running Git.

Inputs: repo_path (required), base, fetch, group, +12 more. Returns: object

preview_workflow_runB

Preview resources, worktree plan, native ownership, permissions and fallback reasons without launching.

The orchestrator receives the permissions required by compatible native children. Supply preview_hash as expected_preview_hash when starting to refuse changed workflow, launch settings or compatibility evidence.

Inputs: name (required), repo_path (required), network, worktree, +1 more. Returns: object

read_workflow_assigned_inputA

Read an immutable input explicitly assigned to your active worker activation.

Only verified managed workers may use this tool. Inputs are authorized by the persisted activation allowlist and content digest, including linked child inputs with a verified parent chain. Live, uncertain, unrelated, revoked, or changed inputs are refused. Concatenate lossless JSON chunk fields until next_cursor is null, then decode JSON. Return next_cursor as cursor; limit counts characters (default 16000, maximum 32000). workflow_run_id is your own run; source_run_id optionally names a linked child run. This does not grant general workflow inspection authority.

Inputs: execution_id (required), workflow_run_id (required), limit, cursor, +2 more. Returns: object

recent_limit_hitsA

Latest provider usage-limit hit per backend and requested model, from persisted task records; direct callers only.

Read-only: nothing is retried, switched or continued. Evidence is a persisted task failure_diagnostic with category usage_limit (never provider_error or prose). There is no pagination: a query sees only the newest 500 hits that match its since, backend and model bounds, so filtering by backend (or backend and model) gives each its own newest-500 window, while an unfiltered query sees only the newest 500 overall. repo and group filter inside that window. model is the requested model; a task on the backend default has requested_model null. since is an inclusive ISO8601 timestamp with timezone. At most 50 backend/model keys are returned. scan.complete is false when older matching hits were left unexamined, the key cap was reached, or the index is still preparing (index_state), so retry while it is preparing. Each hit carries task_id, title, group, observed_at (when the task settled: finished_at, else started_at, named by observed_at_source; not necessarily when the provider rejected the request), diagnostic and reset {raw, at, state}. A numeric reset is epoch seconds. reset.state is future, elapsed or unknown; elapsed only says the stated time has passed and does not say the provider is available again. See docs/usage-limits.md.

Inputs: repo, group, model, since, +1 more. Returns: object

recover_workflowA

Explicitly recover a failed settled run or a root with a confirmed-dead scheduler.

Supply a reason and retain completed work. Interrupted scheduler recovery preserves existing attempts and decision budgets; uncertain execution ownership blocks recovery. Accepted recovery sets the run's resumed_at. Pass the originally displayed attention_checkpoint_id to bind failed-run or scheduler recovery to its current persisted identity. Stale requests refuse without applying the reason or grants.

Preserve spaces and word boundaries in reason rather than compressing natural prose; the caller's source text is retained unchanged before workflow input assembly.

Inputs: reason (required), workflow_run_id (required), additional_attempts, attention_checkpoint_id. Returns: object

register_artifactA

Register an existing regular-file metadata reference for the verified calling task.

No owner parameter is accepted. Relative paths use the recorded repository; only repository, allocated own scratch (including a granted shared chain or group folder), and revalidated saved grants are accepted. A standalone task, or a running workflow node, orchestrator turn or native-subagent controller, may register; its reference is bound to that workflow execution. Builders and inherited descendants are refused. A native subagent has no channel of its own: what it registers lands on its controller. Notes are preserved verbatim. Kinds: screenshot, log, report, other. Paths and notes are at most 4096 UTF-8 bytes; at most 100 references per task and a 1 MiB manifest. A reference establishes no content validity, task success, access, copy, or publication authority. No content is read, copied, hashed, previewed, or published. Caller indexing is bounded; retry a catalog-preparation error to advance cold history.

Inputs: kind (required), path (required), note. Returns: object

release_slotA

Release this execution's lease or cancel its queued request. Cleanup remains capacity consuming until successful; failed/uncertain cleanup requires human inspection and resolve. Stop all owned heavy descendants before release. Client interruption alone never releases. Disabled layout returns error data.code phase_slots_not_enabled; other refusals remain distinct.

Inputs: lease_id (required). Returns: object

replan_workflow_steeringA

Withdraw one exact never-started root headless Fresh worker and link a same-assignment retry.

Requires workflow-steering-replan.v1, schema 2/current ledger_epoch, the engine-issued replan target and withdrawal witness, and the existing interaction/cancellation authority. A managed worker cannot invoke this control. The source must be configured headless and fixed Fresh. The original launch must acknowledge the exact generation as never started, and matching releases must finish before replacement. The queued conversation issuance remains charged. Preserve assignment, configured candidate, permissions, finite cap, node/visit, accepted decisions and sibling evidence. Already issued work refuses; a spawn race remains unknown and cannot authorize replacement or a late cancellation signal. No graph edit, alternate candidate, automatic repair, allowance grant or poststart containment authority is added. Replay the same request after response loss; an expired epoch never dispatches.

Inputs: request (required), workflow_run_id (required). Returns: object

respond_approval_requestA

Reserve approve/reject for one exact action, with stale/duplicate answer protection.

Only the authoritative root interaction owner can answer; workers/orchestrators cannot self-approve. interaction_owner="monitor" is refused on this MCP caller channel: the Monitor answers through harflow-ctl, and every MCP decision is recorded as a caller decision. Approval preserves exact original input and never installs permission suggestions or reusable grants. Reservation, local pipe delivery and observed tool outcome are separate states. No ambiguous decision is automatically resent. A request unanswered after 1800 seconds, or at an earlier workflow attempt deadline, is rejected by Harflow (approval_expired) and never approved; a stale or expired answer fails. There is no approve-later path after a denial or expiry. Recovery is always a new resume_task or continue_task execution of the finished task, and what to change follows the denied entry's denial_remedy: allowed_commands covers only Bash approval_required and chained_command parts; a denied or expired Read, Write or Edit needs a resumed run (caller_approvals and caller_write_approvals are inherited) so the agent can raise a fresh request; path_safety and outside_working_directory go through caller approvals, not grants; a deny_rule cannot be lifted by grants. Messages and resume are never decisions.

Inputs: task_id (required), decision (required), request_id (required), action_digest (required), +2 more. Returns: object

resume_taskA

Continue a finished task's session with follow-up instructions.

Args: task_id: A task that has finished; its session is the one resumed. followup_prompt: What the agent should do next, with the prior context intact. Write it in plain prose, as with start_task's prompt: preserve spaces and word boundaries and never concatenate words to shrink the payload — the text is stored and delivered exactly as submitted. Blank or all-whitespace follow-ups are rejected rather than trimmed into shape. May be omitted only when the task has follow-ups queued with send_message (see below); otherwise it is required. max_turns: Cap on agent turns, where the backend supports one. network: Optional boolean overriding the parent run's network setting for this run only: None (the default) inherits what the parent was dispatched with — which is also the historical default for a record written before the field existed — True asks for no network barrier of harflow_mcp's own, False asks for one, honoured or refused exactly as on start_task for the parent's freedom. fetch: Optional refresh of remote-tracking refs before the resumed agent starts. true uses the default remote; a list names remotes. A prepared branch is reused and is not recreated. branch and base are not accepted on resume. fetch_required: When true, a fetch failure refuses the resume. group_report_output: None inherits the saved group-scoped output opt-in; false disables it. allowed_commands: None (the default) inherits the parent's saved command grants; a list replaces them for this run after the same validation and nested-subset check as start_task, which documents the grammar and limits.

Follow-ups queued on the task with send_message are consumed by this call, exactly once: the prompt is each queued message as a block "Queued caller follow-up N of M (message , queued ):" followed by its text exactly as sent, in queue order, a blank line, then followup_prompt verbatim — or the line "End of queued caller follow-ups." when it is omitted. The new task's task_started event lists the message_ids. A message cannot be consumed twice; one that cannot be proven undelivered after a failed launch is kept as delivery_unknown rather than re-queued.

A task that had resources re-queues the same names; if they are busy the call returns at once with launch_state: "waiting_for_resources", hands the consumed follow-ups to the waiting launch (consumed when it spawns, queued again if it never starts) and has no record until then.

Returns a new task_id sharing the original session, and returns immediately as with start_task. Runs on the same backend, model, reasoning_effort and freedom as the original — none of these can be changed on resume, since a mid-conversation switch would not honestly describe what produced the reply. network is the one per-run override, because it is a per-run sandbox setting rather than a description of the session.

Some backends mint their own session id and only disclose it mid-run; if a task died before doing so, its conversation cannot be continued and this says so rather than starting a disconnected one.

Inputs: task_id (required), fetch, network, max_turns, +7 more. Returns: object

resume_workflowA

Resume a caller-owned run with instructions and optional explicit attempt grants.

Preserve spaces and word boundaries in instructions rather than compressing natural prose; the caller's source text is retained unchanged before workflow input assembly.

For non-question continuation, pass the originally displayed attention_checkpoint_id. A stale checkpoint refuses the answer and grants; refresh before submitting again. Omission retains legacy caller behavior. Do not combine it with decision_id.

For needs_input, supply its current input_decision_id as decision_id and a nonempty answer in instructions. Stale answers and live/uncertain dispatches are refused. When the root run carries a forwarded question from a Run workflow descendant, the answer is applied to the attention source run; additional_attempts go to that source and grant no fresh child. For an orchestrator usage-limit checkpoint, instructions must exactly match an offered recovery answer (fallback, fallback:2, and so on, or retry_current); this approves a Fresh configured recovery candidate for the preserved decision. Other prose does not approve replacement dispatch. Use pause_workflow to wait or cancel_workflow to stop. A paused quota checkpoint retains its decision_id and still requires the exact offered recovery answer (fallback or retry_current) on resume. An accepted resume or answer sets the run's resumed_at; an answer routed through the root stamps the root. Worker usage-limit recovery is selected explicitly by the orchestrator using an issued retry continuation and candidate_id, within attempt limits. The orchestrator may instead ask the caller to pause, cancel, or choose a configured worker fallback; after the answer it must explicitly select the candidate_id. Answers alone never authorize skipping. Set allow_optional_review_skip=True only to permit the orchestrator to skip a current settled optional review with recorded harness permission denial, when optional_review_skip_available is true. The core revalidates eligibility and decision_id; this grants no retry, required-review bypass, or permissions. For a forwarded question, consent applies only to its originating child checkpoint. Each accepted answer replaces previous skip consent at that checkpoint: the default False revokes it, while True renews it with the latest answer as its reason.

Inputs: workflow_run_id (required), decision_id, instructions, additional_attempts, +2 more. Returns: object

revise_workflow_goalA

Revise a root run goal at a quiescent paused or awaiting-input checkpoint.

Only the run's interaction owner can revise it. Supply the current goal_revision (0 if no goal exists). Stale revisions, terminal runs and active nested/parallel work are rejected. The nonblank goal is preserved verbatim up to 64 KiB UTF-8. History and completed work remain; previous assessments are invalidated and replanning is required before further dispatch. Each run retains at most 64 goal revisions (including the initial goal) and 1 MiB UTF-8 of cumulative goal text. Edits exceeding either bound are rejected; start a new run.

Inputs: goal (required), run_id (required), expected_revision (required). Returns: object

save_workflowA

Validate and save an explicit workflow; expected_revision protects concurrent edits.

The store creates persistence envelopes; supply only the authored graph payload. Incompatible or unavailable saved sources refuse mutation and complete-store indexing. expected_workflow_id optionally checks the loaded stable identity, rejecting a deleted or replaced same-name definition even if its revision matches. Every save normalizes context_delivery to optimized_v1, including omitted or legacy values. Historical runs retain their pinned delivery policy. Bounded delivery uses session-bound acknowledgements and assigned evidence retrieval, with a 64 KiB target that never silently cuts required constraints. orchestrator.instructions holds the workflow purpose; Start and End have no settings. on_demand_nodes is separate from connected nodes, with id/title, required instructions, optional call_condition (When to call guidance), agent/fallbacks, freedom/network, session_mode agent_decides|fresh|resume and execution_mode headless|prefer_subagent. Standalone IDs are unique across both lists; connections cannot reference them. max_on_demand_calls defaults to 5, range 1–50, per routing/question checkpoint; no per-node or per-run call cap exists. Legacy Start prompt migrates on saved reads. Set routing_mode="explicit". Ordinary nodes choose exactly one outgoing path. Parallel execution uses paired parallel_start/parallel_end nodes with shared parallel_group_id. Every branch reaches its matching end; nesting is supported. A Run workflow node (type "workflow") references a saved workflow by workflow_ref.workflow_id with orchestrator_mode child or current. Child mode supports child_session_policy agent_decides (default), fresh, or resume. Resume inherits only the latest completed compatible child conversation in this immediate parent run, with fresh workflow state; an unavailable explicit Resume fails closed. Current mode retains its owner. The whole dependency tree is resolved and pinned at save, so missing references, cycles (reported as A > B > C > A) and nesting beyond four levels are refused before anything is written. Agent callers may save only access and network settings within their recorded capability envelope, checked over the resolved tree; verified human callers can author workflow permissions.

Inputs: name (required), definition (required), expected_revision, expected_workflow_id. Returns: object

send_conversation_messageA

Send one exact Queue or Now request using conversation_delivery_v1.

Queue finishes the active response before automatic delivery. Now requires a qualified native interruption route; unsupported targets refuse before input. Requests include a UUID and exact conversation/head/turn/generation/epoch witness. Acknowledged intent is distinct from native input consumption. Repeat an uncertain call with the identical request, never a fresh UUID.

Inputs: request (required), interaction_owner. Returns: object

send_messageA

Queue exact caller prose for any task's next continuation or owning workflow dispatch.

delivery is queue (default; never folds into the current turn) or now. Now starts a safely settled standalone continuation; an unsafe interruption returns a stable refusal alongside the queued message id, preserving the message for later. When delivery is queue and resolve_status says the target has already finished, the reply keeps the queued message id and adds target_settled: true, target_status, and a note that the message waits for resume_task / continue_task (or delivery="now"). A running target, including a recovered task that is still alive, returns the same reply as before, with no settled fields. Workflow/node messages follow their owning workflow and never widen node authority; a completed non-builder or cancelled run says no further dispatch will consume the message. Use interaction_owner=monitor only from a verified human Monitor caller. Status exposes messages and queued_followups.

Inputs: text (required), task_id (required), delivery, interaction_owner. Returns: object

send_workflow_messageA

Queue a workflow or node message for its next issued dispatch. Exact prose and order are preserved. now refuses unsupported interruption or required checkpoints while keeping the queued message and returning its id plus a stable refusal code. A queued message to a completed non-builder or cancelled run adds target_settled, target_status and a note that no further dispatch will consume it; a running run, a failed run and a completed builder omit those fields. No permission, goal, decision or attempt budget is changed. Owner checks match other workflow interactions.

Inputs: text (required), run_id (required), task_id, delivery, +1 more. Returns: object

slot_statusB

Read bounded phase holders, queue positions, capacity, cleanup blockers and timestamp events. This read never performs cleanup or changes the ledger. Disabled layout returns error data.code phase_slots_not_enabled; other refusals remain distinct.

Inputs: name. Returns: object

start_taskA

Dispatch a coding task to a headless agent and return immediately.

conversation_profile explicitly requests a qualified native control transport (native or shipped-medium35-high). Missing runtime/profile qualification refuses before launch; this does not enable caller approvals.

Args: prompt: Instructions for the agent. Be specific about the desired end state. Write it in plain prose: preserve spaces and word boundaries, and never concatenate words or strip whitespace to shrink the payload — harflow_mcp stores and delivers the text exactly as submitted, so compressed text reaches the agent exactly as garbled. Blank or all-whitespace prompts are rejected rather than trimmed into shape. repo_path: Absolute path to a git repository; the agent's working directory. backend: Which harness to use — "claude", "codex", "opencode", "vibe" or "antigravity". See list_backends. freedom: "read_only", "write_in_repo" (default), "publish", or "unrestricted". "publish" sits between "write_in_repo" and "unrestricted": it authorizes an attempt to remote publishing, including commit/push/PR creation/reviews, but that is not a promise the attempt succeeds — credentials, remote permissions, branch protection and hooks are all outside harflow_mcp's control. On Claude Code, write_in_repo denies a direct git commit and git push; publish authorizes committing; inherited harness rules can still restrict it. enforcement.local_commit reports that policy as denied, allowed, or not_enforced. How each level is enforced depends on the backend; the returned enforcement says what actually applies, via local_commit, publish_attempts_allowed and network_access among other fields. model: Model for this run, in the backend's own naming. Rejected outright, rather than silently ignored, when model selection is unsupported. Vibe accepts a configured model alias through its qualified ACP transport and verifies the selected alias; see list_backends' capabilities.supports_model_selection. background_idle_seconds: Optional finite positive live-input background wait bound, at most 21600 seconds. Capped/classic runs do not use live-input idle waiting. Continuations inherit the saved effective bound unless overridden. max_turns: Cap on agent turns. Only some backends support this; asking for it on one that does not is an error rather than being silently ignored. reasoning_effort: "low", "medium", "high" or "xhigh", passed to the backend verbatim. Rejected up front when the chosen backend has no effort control at all (vibe is config-only and has none), or is asked for a level outside the ones it declares (see list_backends — antigravity accepts only low/medium/high, and its CLI would refuse xhigh before the run starts, exit 1); harflow_mcp cannot tell whether the chosen model honours it — on opencode in particular, a model with no declared variants silently ignores an unsupported level rather than erroring, and on antigravity a model id that encodes its own level makes the CLI refuse --effort at startup. See list_backends' per-backend reasoning_effort caveats for what is and is not known there. caller_approvals: Opt in to version-qualified exact-action caller decisions: Bash, plus Read on Claude Code 2.1.310 (approving a Read can disclose files outside the repository). Qualified Codex app-server and Vibe ACP transports also support exact-action decisions; supported tools, freedoms, caps and platforms are in list_backends caller_approval_support. Defaults off; worker self-approval is prohibited. Decisions do not override saved policy or grant reusable access. Inspect list_approval_requests and get_approval_request before responding. caller_write_approvals: Additionally allow Write and Edit requests (including outside the repository) to be approved one exact action at a time. Requires caller_approvals and a version that qualifies it; defaults off, in which case Write and Edit requests are answered with a delivered Harflow refusal. Harflow-protected paths are always refused. interaction_owner: caller by default; monitor requires the verified human Monitor path. network: Optional boolean asking for network access independently of freedom: True asks harflow_mcp to impose no network barrier of its own, False asks it to impose one, and None (the default) keeps each freedom's historical behaviour exactly. The parameter governs harflow_mcp's own network barrier only — never reachability: a corporate firewall or proxy defeats it too. Codex accepts sandbox network pins, whose effective barrier can be bypassed by inherited rules, and its support is non-rectangular (see capabilities.network_control): enabling is refused at read_only and blocking at unrestricted. On claude, opencode, vibe and antigravity, True is accepted — there is nothing to impose — and False is an error rather than silently dropped; enforcement.network_access stays "not_controlled" there. The established guarantee is stated on the returned task's enforcement.network_access; requested pins alone are not proof. group: Optional label (1-128 chars), inherited by any nested dispatch this task's own agent makes through harflow_mcp (unless that dispatch gives its own). Useful for tagging a family of dispatches you want to find together later via list_tasks. It also names a scratch folder shared by every task in the group, exposed to the agent as $HARFLOW_GROUP_SCRATCH and reported as scratch.group in task status (see docs/shared-scratch.md); every task also gets $HARFLOW_CHAIN_SCRATCH, shared with its resumes and continuations. title: Optional short human-readable label (at most 90 characters after trimming, no control characters) shown for this task in the Monitor. Purely informational. It is never inherited from a calling task: a dispatch without a title has none. A resume_task continuation carries the resumed task's title. auto_continue: Integer 0–10 (default 0). Opt in to that many fresh successors after backend-confirmed recoverable cutoffs and observed process/output settlement. Supported cutoff profiles are backend-owned; missing answers alone never qualify. Cancellation, permission denial, usage limits and workflow-owned tasks are excluded. Detached task owners preserve automatic continuation across MCP server death. Task-owner death retains uncertain reservations rather than duplicating execution.

notify: Configured destination alias, direct callers only. Intent is durable before spawn.
    Receivers must deduplicate stable IDs; retries resume only while a server is active.

observe_repos: Optional list of up to seven absolute repository paths to observe alongside
    the launch directory. Observation grants no filesystem or publishing authority.
extra_writable_paths: Optional bounded list of existing absolute local file or directory
    paths. At most 16 paths, 4096 UTF-8 bytes each and 16384 bytes total. Relative paths,
    missing/special paths, filesystem roots and canonical duplicates are errors. Only
    version-qualified configurations in capabilities.extra_writable_paths are supported;
    other harnesses/configurations reject the request. The certified bounded mode clears
    ambient writable roots and excludes implicit temporary roots. Known external execution
    configuration namespaces of all registered backends remain protected; existing unsupported
    inputs reject requests. Inherited repository configuration authority gains no new exclusions. Grants permit reads
    as well as writes, never publication. Omission inherits a detected owner's grants;
    nested requests cannot widen them. Saved grants and path identities carry through
    resume/continuation; replacement requires a new authorized task. Workflows and
    native adapters do not accept these grants. Use preview_task_permissions before launch.
    Keep qualified startup inputs stable: checks refuse observed changes but do not atomically
    pin configuration or executables against independently authorized concurrent writers.
group_report_output: Opt in to a qualified read_only repository run with write access only
    to its own nonempty group scratch folder. Defaults off; resumes/continuations inherit
    unless overridden. Unsupported backends and conflicting grants are refused; see list_backends.
    Prompt prose is preserved; use $HARFLOW_GROUP_SCRATCH/report-$HARFLOW_TASK_ID.md.
git_https_rewrite: Optional boolean overriding HARFLOW_GIT_HTTPS_REWRITE (default on).
    Appends process-local GitHub SSH-to-HTTPS URL configuration; never changes Git files.
    HTTPS credentials, sandbox access and reachability remain external requirements.
allowed_commands: Optional list of Bash command patterns granted for this run only, so a task can run
    specific commands (a test runner, a build) without `unrestricted`. At most 16 patterns, 256 bytes
    each and 2048 in total. Supported on qualified Claude Code and Vibe ACP at write_in_repo and publish
    (see list_backends capabilities.allowed_commands); other backends and access levels refuse it. Each
    pattern is a lowercase program followed by literal tokens, with at most one `*` as the final
    token or the `:*` suffix (`pytest` style: `python3 -m pytest:*`), and a wildcard needs a literal
    subcommand or target (`make test:*`). A pattern with no wildcard is exact and matches one command
    line; `:*` or a final `*` is a prefix. A bare program name such as `swiftlint` is exact: it matches
    only that command with no arguments, and the dispatch notice suggests `swiftlint:*` or
    `swiftlint lint:*`. Options before a goal are literal and order-sensitive, so `mvn -o test:*`
    does not match `mvn -q -o test`; `mvn -o:*` is refused because a goal must follow the options.
    A launcher whose command has no subcommand, such as `npx tsc:*`, is refused; grant the exact
    command, for example `npx tsc --noEmit -p .`. Programs whose arguments start with options, such
    as `xcodebuild -workspace App.xcworkspace -scheme App test`, cannot take a wildcard: grant each
    full command line exactly. Shells, wrappers, interpreter evaluation and gh below
    `publish` are refused. Exact Git fetch, ff-only pull and non-force switch/create grants are
    supported at write_in_repo and publish; wildcard/config/reset/force Git grants are refused.
    Initial transition grants require clean checkouts; later dirty races remain Git controlled.
    Commit/push authority is separate (`publish`); paths must stay inside the repository.
    The grammar is a guard against mistakes, not a security boundary: grants are Claude permission-layer
    approvals, not OS enforcement. An exact pattern matches one command line and a prefix matches that
    command with further arguments. A granted program can run repository code, chained commands need every
    part allowed, and the access level's git commit and push denies still win, except the exact
    merge-conclusion grant (`git commit --no-edit` or `git merge --continue`) which omits the
    broad commit deny and is gated on MERGE_HEAD. Ordinary commits stay refused.
    Omitted or null grants
    nothing. A nested dispatch may grant only exact patterns its caller holds (unless the caller is
    unrestricted) and never inherits them. resume_task and continue_task inherit the saved list when
    omitted and replace it when given. Status reports each grant's match as
    enforcement.extra_allowed_command_matches. See docs/harness-permissions.md.
branch: Optional literal branch name, set together with base. Harflow fetches that base and
    runs `git switch -c` before the agent starts, at any freedom except read_only. Refused
    when the checkout is dirty, the branch exists, the base cannot be fetched, or a merge or
    rebase is in progress. Never stashes, resets or forces. Resume and continuation reuse the
    prepared branch and do not accept branch or base.
base: Remote-tracking base `<remote>/<branch>`, for example origin/develop. The first
    component is the remote. Set together with branch.
fetch: true refreshes the default remote; a list of literal remote names refreshes those.
    Harflow runs `git fetch --prune` before the agent, at every freedom and backend, including
    read_only. A failure is recorded and the task still starts unless fetch_required is true.
fetch_required: When true, a fetch failure refuses dispatch and the agent does not start.
    Requires fetch.
resources: Optional list of 1-16 resource names (lowercase letters, digits and `. _ : -`, at most
    64 characters, starting with a letter or digit; for example `ios-simulator` or `repo:main`)
    this task needs exclusively. Capacity is one per name: the task does not start until it
    holds every name, strictly first come first served per name, all or none. While it waits
    it has no task record: the call returns at once with `status: "running"` and
    `launch_state: "waiting_for_resources"`, and get_task_status, wait_for_task, list_tasks and
    cancel_task all work on it. Names are released when the run's exit is observed. Resources
    grant no access and are accepted at every freedom; they need a supervised server or
    `harflow-ctl`. A task started by a task that holds resources may only use names that parent
    declared (they are borrowed, never queued); declare every resource at the outermost task.
    A task started from inside a workflow attempt cannot request any in this release.
    resume_task, continue_task and automatic continuation re-queue the same names. See
    docs/resources-and-worktrees.md.
resource_wait_seconds: How long to wait for `resources`, 0..21600 (default 3600). 0 means grant
    now or fail. A task that waits out the bound never starts and reports `not_started`.
worktree: Optional `{base_ref?, branch?, detach?}`: run the task in its own linked Git worktree,
    `<HARFLOW_WORKTREE_ROOT>/<task_id>` (default root `~/.harflow-worktrees`), so it can write
    without touching your checkout or index. `base_ref` (default the repository's HEAD) is
    resolved to a commit after any resource wait; `branch` (default `harflow/<task_id>`) must
    not exist yet, or `detach: true` checks out the commit with no branch. The task's
    `repo_path` and working directory are the worktree, and `worktree.source_repo_path`
    keeps the original. Refused at `read_only`, for nested dispatches and for a repository that
    configures Git filter drivers (including LFS); repository hooks do not run while it is
    created. Nothing removes a worktree or deletes its branch automatically: use
    `harflow-ctl worktree-list` and `worktree-remove`. The call returns once the launch is
    accepted, typically with `launch_state: "granted"` while the worktree is made. See
    docs/resources-and-worktrees.md.

Returns the new task_id and its starting state. The run continues in the background; poll get_task_status or call wait_for_task to follow it.

If this task is itself dispatched from inside another harflow_mcp task's agent (a nested MCP call), that ancestry is recorded — spawned_by, root_task_id, depth — on a best-effort basis (see lineage_detected on the returned task: which detection method found the caller, or null if none was found and this is treated as a root task). When a caller is detected, this dispatch is also checked against it: a nested dispatch weaker than its caller on depth or on any enforcement field is refused outright (NestedDispatchRefused). This cap is best-effort, not a sandbox boundary — nothing stops an agent from dispatching outside harflow_mcp entirely.

Inputs: prompt (required), repo_path (required), base, fetch, +26 more. Returns: object

start_workflowA

Start a durable workflow run; returns workflow_run_id rather than task_id.

Saved top-level resources are held through pauses and caller-input checkpoints; agent-node resources are acquired before a harness slot. Resources grant no access. Optional worktree {base_ref?, branch?, detach?} creates one shared checkout for the root and every child run after the run-scope grant. Nested callers and workflows whose agents are all read_only cannot request one. The default branch is harflow/workflow-<run_id>. Removal is explicit through harflow-ctl. Resources and the worktree plan are bound by expected_preview_hash.

Preserve spaces and word boundaries in prompt rather than compressing natural prose; the caller's source text is stored unchanged before workflow input assembly.

The complete dependency tree of any Run workflow node is resolved and pinned before the run is created, so later edits or deletes never reinterpret the run. Children are linked runs that share the root's harness-turn budget; public controls apply to the root run id only.

goal is optional nonblank text up to 64 KiB UTF-8, preserved verbatim. It complements the saved purpose and request without expanding permissions. notify reserves configured root-run settlement/attention webhooks before creation; notify_events selects terminal, attention, or both (default). Direct callers only; see docs/task-notifications.md. Completion requires an assessment with evidence for the current goal revision; conflicts or unverifiable criteria need input.

Inputs: name (required), prompt (required), repo_path (required), goal, +7 more. Returns: object

steer_workflowB

Explicitly request one finite builder, orchestrator or qualified worker response with exact revisions.

Open/reply/retarget require exact engine-issued identity, a unique request_id and verbatim text. Preserve all spaces, newlines and Unicode. Prose replies wait for another explicit caller request; a valid framed builder proposal stays unsaved, while a current orchestrator frame commits only configured validated actions. Admission holds new affected scheduling and preserves already issued work and active sibling evidence. There is no automatic conversational loop or automatic permission expansion. Workers retain their actual configured permissions and real effects. Require worker/window capabilities, explicit schema 2 upgrade and current ledger_epoch; expired requests never authorize replacement. A worker needs allow_fresh_context consent and a supported finite cap (at most 8 or the smaller configured cap); unqualified Resume/native refuses. Steering never charges or resets normal execution counters. Dismiss does not clear the worker result requirement. MCP cannot claim native take_owner/release_owner; cancellation/reselection remains unsupported.

Inputs: request (required), workflow_run_id (required). Returns: object

subscribeA

Durably subscribe to one task's observed terminal settlement using a configured alias.

Direct callers only. The server administrator configures HARFLOW_NOTIFY_DESTINATIONS; caller URLs and secrets are refused. Repeated task/alias subscriptions share a stable event ID. Delivery retries at most six times and can duplicate after a crash: receivers must deduplicate IDs. Pending delivery resumes while a configured server is active, not while every server is down. Delivery failure never changes task execution. See docs/task-notifications.md.

Inputs: notify (required), task_id (required). Returns: object

subscribe_workflowB

Subscribe a root workflow to configured webhooks (terminal, attention, or both).

Direct callers only. Current and future points are delivered; historical points are not replayed. Repeat calls update event selection. Delivery never changes workflow execution.

Inputs: notify (required), workflow_run_id (required), events. Returns: object

unsubscribeB

Stop future attempts for a task/alias (or all aliases); in-flight requests may finish.

Inputs: task_id (required), notify. Returns: result

unsubscribe_workflowC

Stop future workflow delivery attempts for one configured alias, or every alias.

Inputs: workflow_run_id (required), notify. Returns: object

wait_for_taskA

Wait for a task to finish, giving up after a timeout without disturbing the run.

Args: task_id: Identifier of the task to await. timeout_seconds: How long to hold, 0..3600 (default 50; 0 observes once without sleeping). Honoured as asked, never silently clamped; out of range is INVALID_PARAMS. Breaking change: values above 3600 are now rejected (0 is newly accepted). Your MCP client applies its own request deadline, and exceeding it fails the call even though the task keeps running — see docs/multi-task-waiting.md before asking for long holds. include_tail: If True, include the full last_output_tail (20 lines × 2000 chars each); if False (default), the tail is omitted for running/completed tasks and shortened to 5 lines × 500 chars for failed tasks. detail: "compact" (default) omits static execution metadata and detailed outcome probes; "full" returns complete MCP status. Both preserve the complete summary/report, approval attention, failure diagnostics and wait fields. include_tail=True retains the full tail in either mode. until: "timeout" (default) returns when the task settles or timeout_seconds elapses. "terminal" holds until the task settles, bounded only by a 6 hour server ceiling; timeout_seconds must then be omitted (passing both is INVALID_PARAMS). ctx: Injected by the server; not a caller argument.

The result is the task status plus requested_timeout_seconds, effective_timeout_seconds, until, timed_out, stop_reason (terminal, attention, timeout, ceiling or observation_unavailable), elapsed_seconds and polling_guidance. If the task is still going when the wait ends, the status is "running" with a next_step hint: call this again, or poll get_task_status. The dispatched process is never signalled, written or resumed by a wait, so waiting is always safe and repeating it costs nothing. For a task recovered from an earlier server process the result carries outcome_observed once it is finished or the wait stopped as observation_unavailable: false (normally with stop_reason observation_unavailable) means its process is gone but its exit was never observed, so the status is an inference — inspect it with get_task_status; true otherwise. It is never present on a task that is still running. Live tasks carry it (true) once finished. Undecided approvals and approval uncertainty stop the wait as attention. Answered approvals still awaiting delivery keep waiting. Older summaries without a decision count retain attention. Approval attention alone says nothing about process liveness. Progress is sent every 5 seconds, best effort. Returns recent_activity — a list of ≤ 5 one-line strings describing the most recent meaningful events — for a live summary without the bulk of the raw stream.

A task still waiting for its resources is running as far as a wait is concerned: the wait holds until it spawns and settles, or reports not_started if it never starts.

Prefer holds <=50 seconds after remote "device did not respond" or "connection closed" deadline errors; the task continues and a shorter wait is safe to repeat.

A coding task can easily run for many minutes. Expect several calls rather than one long one. Confirmed usage limits retain failure_diagnostic and partial output while the task owner settles the process. Waiting does not retry the task or authorize a paid fallback.

Inputs: task_id (required), until, detail, include_tail, +1 more. Returns: object

wait_for_tasksA

Observe 1..32 unique task IDs, returning compact statuses in requested order.

mode any returns when at least one requested task is settled; all waits for every task. timeout_seconds accepts 0..3600 (default 30) and is honoured as asked, never silently clamped; out of range is INVALID_PARAMS. Zero polls immediately. until="terminal" holds until the mode is satisfied, bounded by a 6 hour server ceiling, and requires timeout_seconds to be omitted. Your MCP client's own request deadline still applies. Prefer holds <=50 seconds after remote "device did not respond" or "connection closed" errors; see docs/multi-task-waiting.md. All IDs must exist and pass caller read authorization before waiting. Existence checks and initial metadata share a two-second I/O budget; undecidable existence rejects the request. A final metadata observation can add up to two more seconds. Returns terminal_task_ids, bounded summaries and get_task_status diagnostic references; no output tails. A recovered task whose process is confirmed gone without an observed exit is listed in undecidable_task_ids (status unknown) and counts as settled in both modes, as in wait_for_task, after a short grace if its owning harflow_mcp server is still alive; an uncertain identity keeps waiting. Under until="terminal", targets that stay unobservable for 3 rounds stop the wait with stop_reason observation_unavailable. Rows carry a bounded failure_diagnostic (category, reason) when one exists. Also returns requested/effective timeout, until, timed_out, stop_reason, elapsed_seconds and polling_guidance. Progress is sent every 5 seconds. Timeout and caller cancellation never cancel or signal the observed tasks.

Inputs: task_ids (required), mode, until, timeout_seconds. Returns: object

wait_for_workflowA

Wait for a workflow run to need attention or finish; read-only and resumable.

timeout_seconds accepts 0..3600 (default 30; 0 reads once). It is honoured as asked, never silently clamped; out of range is INVALID_PARAMS. Breaking change: values above 300 used to be rejected, and 46..300 were silently held for only 45 seconds. until="terminal" holds until the run stops needing the wait, bounded by a 6 hour server ceiling, and requires timeout_seconds to be omitted. Your MCP client's own request deadline still applies. Prefer holds <=50 seconds after remote "device did not respond" or "connection closed" errors; see docs/multi-task-waiting.md.

Returns when the run is completed, failed or cancelled and has finished settling (stop_reason terminal), or reaches needs_input, needs_attention or paused (stop_reason attention), or the hold ends (timeout, ceiling). If reading the run keeps failing for 3 rounds the last good snapshot comes back with stop_reason observation_unavailable, as does an until="terminal" wait on a terminal run that stays settling with its run file unchanged for 300 seconds. Also returns requested/effective timeout, until, timed_out, elapsed_seconds and polling_guidance. Approval read errors alone do not stop the wait for attention; inspect approval_summary.read_errors for incomplete sources. Known unanswered requests and uncertain approval ownership still stop for attention. Progress is sent every 5 seconds, best effort. A wait never changes, resumes or cancels a run.

Inputs: workflow_run_id (required), until, timeout_seconds. Returns: object

workflow_builderB

Generate a workflow, or refine the current canvas into an unsaved validated proposal.

Orchestrator instructions belong in orchestrator.instructions; Start/End are structural. Optional on_demand_nodes are a separate ordered list with globally unique local id, title, required nonempty instructions, optional call_condition (When to call guidance), agent, freedom, network, session_mode agent_decides|fresh|resume and execution_mode. They have no position, role or connections. max_on_demand_calls defaults to 5 (1–50) per routing/question checkpoint; no per-node or per-run call cap exists.

Write prompt in plain prose: preserve spaces and word boundaries rather than concatenating words to save tokens. The caller's prompt is retained unchanged before builder input assembly.

Keep node and connection instructions concise and task-specific. HarflowMCP owns runtime retries, budget enforcement, configured fallback dispatch and user interaction; use existing configuration fields for limits and fallback candidates, and orchestrator needs_input for clarification or approval. End means intentional workflow termination, not waiting for user input. Preserve legitimate task branches and revision loops.

Layout uses top-left logical point coordinates with x/y >= 0 and a 10-point dot grid. Agent nodes are 200 x 92 points (reserve 20 x 10 grid cells); Start/End are 72 x 72 (reserve 8 x 8 cells). Leave at least 40 points (4 cells) between node edges and avoid overlaps. Arrange forward steps left to right and parallel branches on separate rows. Use routing_mode="explicit". Ordinary outgoing paths are exclusive alternatives. Parallel execution requires paired parallel_start/parallel_end structural nodes with a shared parallel_group_id; every branch must reach its matching end. Parallel start defaults to branch_selection: "all". With branch_selection: "orchestrator", the orchestrator selects applicable issued branch continuations, assigns each selected entry through branch_assignments, and records a non-empty selection_reason explaining selections and exclusions before dispatch. Optional selection_guidance advises that choice. Selected branches may contain multiple steps and properly nested groups; convergence uses the frozen selected membership, including singleton selections. Preserve existing node positions exactly unless the user explicitly asks to move or rearrange them. Preserve any supplied Run workflow nodes exactly (workflow_ref, orchestrator_mode, child_session_policy, attempts, timeout, optional); never author new Run workflow references. Child session policy is agent_decides (default), fresh, or resume, and is inactive in Current mode. Resume reuses only the latest completed compatible invocation in the immediate parent run, with fresh workflow state; explicit Resume never falls back Fresh. The canvas expands automatically; there is no fixed right or bottom boundary.

Inputs: name (required), prompt (required), agent, source, +3 more. Returns: object

workflow_limit_hitsA

Provider usage-limit hits and blocking recoveries of workflow runs, from persisted run evidence.

Read-only: nothing is retried, switched or continued. Evidence is only an attempt's failure_diagnostic with category usage_limit (headless and Codex-native attempts alike) and the run's orchestrator or worker usage-limit recovery checkpoint; node results and prose are never read. Direct callers read every run; a workflow orchestrator reads its own run and descendants verified through persisted invocation links; workers and builders are refused.

current lists runs blocked on a usage-limit recovery (at most 100), reported on the owning run even while its root is running. latest is the newest hit per (backend, requested_model, observed_model) among the newest 500 hits matching the window bound: the first of root_workflow_run_id (not supported for managed callers), workflow_id and repo that is set, plus the since (inclusive) and before (exclusive) ISO8601 range with timezone; the other filters apply inside that window and there is no pagination. At most 50 keys are returned. current_only reports only current. Each hit carries root_workflow_run_id, workflow_run_id, node_id, execution_id, attempt, task_id, transport_task_id, observed_at (when the attempt settled; observed_at_source names the field), diagnostic, reset {raw, at, state} (a numeric reset is epoch seconds; elapsed does not say the provider is available again), an accepted recovery {accepted, answer} when one answered it, and detail_ref, the get_workflow_run_detail arguments for execution:. Each attempt is its own hit: native children that share a transport report it in transport_task_id. unavailable lists up to 20 runs whose document could not be read. scan.complete is false when a cap was reached, runs are unavailable or the index is still preparing (index_state), so retry while it is preparing. See docs/usage-limits.md.

Inputs: repo, since, before, workflow_id, +2 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 63 tools

    Disambiguation2/5

    The set contains multiple near-duplicate surfaces: list_tasks vs list_task_page, get_task_events vs get_task_event_page, list_workflow_runs vs list_workflow_run_page, and send_message vs send_conversation_message. The detailed descriptions differentiate them, but an agent must read lengthy text to choose correctly, so misselection remains likely.

    Naming Consistency4/5

    Most tool names are snake_case verb_noun patterns such as start_task, get_task_status, cancel_workflow, and list_workflows. Exceptions are noun-style names such as workflow_builder, slot_status, recent_limit_hits, and workflow_limit_hits, plus generic subscribe/unsubscribe.

    Tool Count2/5

    At 63 tools the surface is well beyond a practical compact toolset; even for a broad orchestration domain, many controls are split into highly granular pairs that could be consolidated. The count substantially increases selection cost and surface-area maintenance.

    Completeness5/5

    The tool set covers task lifecycle, workflow authoring and runs, approvals, notifications, artifacts, steering, recovery, resources/slots, and messaging with few obvious dead ends. For the stated orchestration domain, lifecycle and CRUD coverage are extensive.

    Maintenance

    ActivityActive
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding providers to run structured multi-agent workflows by claiming tasks, logging actions, managing handoffs, and enforcing server-side health gates across explorer, consultant, builder, and reviewer roles. Specifications stay as Markdown on disk while tracked task state, acceptance evidence, and completion checks are owned by the server.
      29 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides a shared task state for local coding agents, letting them bootstrap a project, list and create tasks, resume work, write checkpoints, inspect configured routes, and plan worker runs. It also exposes a bounded delegation call that invokes configured local agent clients, returning a proposal that requires human review since it may consume quota or balance.
      31 PyPI
      PolyForm Noncommercial 1.0.0