Subagent status and macOS permissions in H v0.5.0
How H v0.5.0 reports provider blockers through awaited subagent submissions, fixes repeated idle catalog snapshots, and isolates macOS folder access from OTP's shared file server.
- Published
- Reading time
- 12 min read
H v0.4.0 added parked tool approvals, external wake signals, and authenticated remote execution. A session could wait for something outside the daemon without keeping an effect worker alive. That made the distinction between active work and blocked work more important to explain in the clients.
A parent session waiting for a subagent is still active. But “waiting on subagent” does not tell me whether the child is generating an answer, waiting for a provider retry, or asking for approval. Opening each child conversation to find the cause is a poor way to supervise several sessions.
H v0.5.0 reports those blockers through the specific submissions a parent is awaiting. It also fixes repeated catalog snapshots on idle SSE connections and adds a native macOS helper for daemon launch and directory enumeration. The filesystem changes address a separate problem: a workspace operation that encounters an unanswered privacy prompt must not occupy OTP’s shared file server and delay unrelated storage work.
This is a smaller release than v0.4.0. Most of the work concerns the accuracy of status reporting and the scope of a blocked operation. Those details deserve an explanation because a plausible status badge or permission setup can hide an incorrect assumption.
Submission-scoped subagent status
H separates session ownership from conversation history. A child session has a parent, but the parent’s current dependency is more precise than that relationship. The parent is waiting for a particular submission in the child session.
Consider a parent that asks a child to review a change. The child session can contain multiple conversations and accept later submissions. If another conversation in that child hits a provider retry, reporting the entire child’s session status to the parent would attribute an unrelated problem to the review. The ownership relationship does not establish that dependency.
The v0.5.0 implementation keys an active watch by the child’s session ID and request ID. The parent’s parked subagent task records the submission it is awaiting. H.Session.Server.State computes runtime summaries for active generation and compaction tasks, together with their owned tool calls, and associates those summaries with the relevant submission IDs.
Queued submissions need care too. A queued follow-up cannot begin until the current run in its own conversation progresses. It therefore inherits that conversation’s current blocker. Work in another conversation is not a dependency and must not affect the projection.
The runtime summary carries these fields:
attentiondescribes whether the work is running, retrying, or otherwise classified.blockergives a sanitized explanation of the wait.next_wake_atcarries the next known wake deadline.needs_attentionindicates that the operator has something to address.
These fields answer different questions. A provider retry is active work with a future opportunity to progress. It is not automatically an operator-attention error. A tool approval, by contrast, can require a human decision while the task remains active.
The regression tests include an awaited submission alongside an unrelated conversation’s retry. The parent must not report that retry as its own blocker. That case is more useful than testing only a parent and a child with one conversation each, where a session-wide shortcut would appear correct.
Concurrent work and retry classification
A parent can await several children while other tools run locally. One retrying child does not mean that the whole parent is retrying.
For example, suppose a parent is waiting for two reviews. One provider has imposed a backoff, while the other child is still generating. The parent remains running, but it can show the provider blocker and a wake deadline. If every awaited child is retrying and no independent local work can progress, the parent’s summary becomes retrying.
The implementation excludes a generation task parked on its own tool round from independent local work. Otherwise, the parent generation would count as runnable merely because its record still exists, and the parent could never accurately report that all useful work is blocked on retries.
This classification does not change the retry machinery. H.Session.Server.Generation still owns provider retry policy. It persists the sleeping task and its deadline before arming the timer. The internal task status remains sleeping during backoff, while the catalog describes that work as retrying. ReqLLM transport retries remain disabled with max_retries: 0.
The distinction matters for both recovery and the inbox. A client label should not invent a new durable task state, and a normal backoff should not send a session into the same attention category as an unresolved error.
Live status without transcript commits
A provider blocker can change several times before a subagent returns an answer. Recording every status change as conversation history would mix presentation updates with durable work records.
H publishes the current awaited-submission details through an ephemeral live.subagent_waits view. Entries are keyed by the subagent tool call ID and contain the child session, child conversation, attention state, blocker detail, and wake deadline. The conversation SSE stream sends these updates without advancing the durable conversation cursor.
The terminal and web clients use this information on the delegation cards. The catalog also receives the parent’s computed runtime summary, so the inbox can explain the wait without requiring the operator to open the child first.
The durable dependency remains the parked task and its recorded child submission identifiers. The runtime watch and its display fields are process state that can be rebuilt. A changing status label does not authorize a tool call, settle a submission, or create permission to replay an external effect after a restart.
This keeps client navigation separate too. Opening a child conversation changes what I am looking at. It does not change which submission the parent awaits.
Idle catalog streaming
The session catalog is a smaller view than a conversation transcript, but a long-lived catalog connection still needs bounded behavior. v0.5.0 fixes a case where an idle connection repeatedly received snapshots instead of staying quiet between keepalives.
The catalog SSE connection starts with an atomic snapshot and its sequence number. Later catalog frames carry updates with increasing sequence numbers. The connection remembers the last sequence it sent and ignores frames at or below it.
An idle connection emits a comment keepalive, normally every fifteen seconds:
: keepalive
It does not need another snapshot just because time passed. In particular, a large initial snapshot must not be treated as a backlog of pending messages. The regression test for this case verifies that a large idle snapshot subscribes once and then produces keepalives.
Backpressure uses the receiving process’s queued messages. The default limits are 128 queued messages and 2 MiB of queued frame payloads. Checking bytes as well as message count matters because a few large frames can consume more memory than many small ones.
If a slow client exceeds a limit, the transport drains stale frames and obtains a fresh snapshot. It then removes queued catalog frames already covered by that snapshot’s sequence and resumes incremental updates. It does not try to preserve every intermediate catalog display state for a browser that cannot consume them.
Catalog update batching reduces repeated serialization work as well. These changes do not establish a latency or throughput benchmark. The concrete guarantees are narrower: idle clients do not repeatedly resubscribe for snapshots, stale sequence numbers do not move the view backwards, and slow clients have a resnapshot path instead of an indefinitely growing frame queue.
macOS folder access and OTP’s file server
macOS privacy prompts introduced a different kind of wait. A folder operation can stop while the system waits for a user decision. If that operation occupies OTP’s shared file_server_2, unrelated file operations can queue behind it, including session storage work and code loading.
Moving the original call into a BEAM task would not fix this. The task would still ask the same shared file server to perform the operation.
Host workspace operations now avoid that server. Metadata and file handles use raw APIs. Where OTP does not expose a public raw variant, a small H.ExecutionEnv.Host.FileSystem module confines the use of local :prim_file operations. Persistence is unchanged.
That internal OTP dependency is a deliberate trade-off. It needs coverage when the runtime changes. The regression test warms code loading, traces messages from a process performing workspace operations, and verifies that those operations do not send requests to the shared file server. It exercises metadata, symlinks, canonical paths, directory listing, and writes in a disposable directory.
This does not make filesystem calls universally nonblocking. A raw operation can still block its caller or a dirty I/O thread, and unlimited concurrent blocked calls remain a problem. The change removes a specific shared-server dependency. It does not put a hard deadline on every filesystem syscall.
The native helper
H.app now includes Contents/MacOS/hi-exec, a Rust executable with the signing identifier co.parlant.harness.hi-exec. It remains the parent of the embedded daemon, forwards termination signals to its child, and preserves the child’s exit status.
The app installs at /Applications/H.app. The embedded bundle’s bin/hi-exec symlink points to that app-relative executable. This gives the permission setup guide a stable location to explain instead of pointing users at a changing release directory.
OTP’s erlexec and beam.smp remain real, separately signed runtime binaries. The helper does not rename the runtime or acquire its privileges by wrapping it.
Bundled directory enumeration also uses the helper. H_FS_EXECUTABLE selects it for host directory listing, and the helper starts a separate native worker. Its parent enforces a two-second deadline and reaps that worker. The BEAM port adds a three-second response deadline and an 8 MiB output cap.
Timeout has its own meaning. H does not turn it into “directory missing” or “permission denied” because an unanswered privacy prompt, an unavailable mount, or a slow filesystem could each produce the same delay. Errors cross the helper boundary through a finite string vocabulary rather than dynamically created atoms or process handles.
Source-checkout runs without H_FS_EXECUTABLE use local OTP operations. File contents and mutations are not native-helper capabilities in this release.
Permission setup and limits
The menu-bar app has a Permissions & Setup… guide with installation guidance, links to Files & Folders and Full Disk Access settings, and a Finder reveal action. It also warns when the app is connected to an external daemon.
That warning matters. Permission granted to H.app need not apply to an older CLI daemon or LaunchAgent. The app does not silently replace a registered service or migrate its active store. The documented transition asks the user to cooperatively drain and uninstall the old service, or stop the standalone daemon, before reopening H.
Folder browsing also avoids unnecessary protected-folder probes. Automatic project-marker decoration skips Desktop, Documents, Downloads, and Library beneath the user’s home on macOS. Listing a parent directory should not open those children merely to look for .git or mix.exs. Explicit browsing remains allowed. This policy does not enforce canonical-path confinement or detect every possible TCC prompt.
A stable helper path is useful, but it is not proof that macOS permissions survive an upgrade. TCC attributes access according to launch and signing rules. Depending on the launch path, macOS can name H, the helper, an OTP runtime executable, or a terminal. Files opened directly by BEAM or a shell do not become helper-owned access simply because the helper launched the daemon.
Production updates must retain the Developer ID team and signing identifiers. Even then, permission continuity needs manual tests of signed releases on supported macOS versions. The verification notes call for grant, denial, revocation, restart, upgrade-in-place, relocation, and separate app-owned versus CLI launches. Automated packaging and filesystem tests cannot establish all of those results.
Full Disk Access is optional and broad. It can expose sensitive user data to the daemon and its tools. H does not edit the TCC database, reset it with tccutil, or approve system prompts. A successful metadata lookup is not evidence that a privacy grant exists.
The helper is not a sandbox, and an OS privacy grant is separate from an agent’s tool approval. Accessibility, Screen Recording, and Apple Events Automation are separate capabilities as well. v0.5.0 does not ship computer control or screen capture, and the settings links in the guide do not request those permissions for coding.
Release and source
The v0.5.0 source includes the runtime projection, SSE, native helper, and regression tests described here. The macOS permission notes separate implemented behavior from proposed computer-control capabilities and list the manual checks required before claiming permission persistence.
The OTP application is still :harness, published on Hex as hiness:
{:harness, "~> 0.5.0", hex: :hiness}
The standalone CLI and daemon are available through hiness.dev, and the Apple Silicon macOS app is available at hiness.app. For an existing CLI service, read the permission guide before switching to the app-owned daemon. The process that owns the session store and the process macOS authorizes need to match the setup you intend to run.