@indigoai-us/hq-cli 5.345.226 → 5.345.230

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/dist/command-catalog.generated.d.ts +376 -11
  3. package/dist/command-catalog.generated.js +451 -11
  4. package/dist/commands/auth.d.ts +2 -2
  5. package/dist/commands/auth.js +3 -3
  6. package/dist/commands/core-delegate-w1b.js +92 -69
  7. package/dist/commands/core-delegate.d.ts +19 -1
  8. package/dist/commands/core-delegate.js +411 -6
  9. package/dist/commands/core-dm-bind-native.js +2 -1
  10. package/dist/commands/core-handoff.d.ts +5 -0
  11. package/dist/commands/core-handoff.js +1008 -14
  12. package/dist/commands/core-pin-native.d.ts +1 -0
  13. package/dist/commands/core-pin-native.js +3 -15
  14. package/dist/commands/core-register-project-native.d.ts +6 -0
  15. package/dist/commands/core-register-project-native.js +182 -52
  16. package/dist/commands/core-work-mesh-bind-trusted-native.js +4 -9
  17. package/dist/commands/daemon.js +2 -2
  18. package/dist/commands/index-cmd.d.ts +3 -1
  19. package/dist/commands/index-cmd.js +12 -0
  20. package/dist/commands/lanes-checks.js +1 -1
  21. package/dist/commands/lanes-session-start.d.ts +1 -2
  22. package/dist/commands/lanes-session-start.js +9 -145
  23. package/dist/commands/lanes-shared.d.ts +3 -0
  24. package/dist/commands/lanes.d.ts +3 -0
  25. package/dist/commands/lanes.js +94 -27
  26. package/dist/commands/link.d.ts +8 -3
  27. package/dist/commands/link.js +14 -17
  28. package/dist/commands/mcp-registration.d.ts +65 -7
  29. package/dist/commands/mcp-registration.js +289 -51
  30. package/dist/commands/mesh.d.ts +12 -0
  31. package/dist/commands/mesh.js +92 -10
  32. package/dist/commands/reindex.js +6 -0
  33. package/dist/commands/repo.d.ts +13 -0
  34. package/dist/commands/repo.js +39 -1
  35. package/dist/commands/sync-mode.d.ts +3 -1
  36. package/dist/commands/sync-mode.js +11 -1
  37. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +1473 -1043
  38. package/dist/hq-cloud-sync-runner/package.json +1 -1
  39. package/dist/lazy-commands.js +3 -4
  40. package/dist/lib/checkpoint-ontology/entity-file.js +4 -4
  41. package/dist/lib/checkpoint-ontology/merge-copies.js +7 -11
  42. package/dist/lib/checkpoint-ontology/plan.js +2 -1
  43. package/dist/lib/core-utils/archive-old-threads.js +5 -2
  44. package/dist/lib/core-utils/session-company.d.ts +13 -1
  45. package/dist/lib/core-utils/session-company.js +75 -4
  46. package/dist/lib/core-utils/worktree-resume.d.ts +6 -0
  47. package/dist/lib/core-utils/worktree-resume.js +8 -4
  48. package/dist/lib/daemon/background-qos.d.ts +7 -0
  49. package/dist/lib/daemon/background-qos.js +13 -0
  50. package/dist/lib/daemon/catalog.d.ts +9 -0
  51. package/dist/lib/daemon/catalog.js +8 -1
  52. package/dist/lib/daemon/hook-requests-acl-suggest.d.ts +18 -0
  53. package/dist/lib/daemon/hook-requests-acl-suggest.js +245 -0
  54. package/dist/lib/daemon/hook-requests-conduct-link.d.ts +20 -0
  55. package/dist/lib/daemon/hook-requests-conduct-link.js +105 -0
  56. package/dist/lib/daemon/hook-requests-fleet-session-start.d.ts +32 -0
  57. package/dist/lib/daemon/hook-requests-fleet-session-start.js +214 -0
  58. package/dist/lib/daemon/hook-requests-mesh-tool-writes.d.ts +44 -0
  59. package/dist/lib/daemon/hook-requests-mesh-tool-writes.js +292 -0
  60. package/dist/lib/daemon/hook-requests-mesh.d.ts +54 -0
  61. package/dist/lib/daemon/hook-requests-mesh.js +559 -0
  62. package/dist/lib/daemon/hook-requests.d.ts +354 -8
  63. package/dist/lib/daemon/hook-requests.js +1330 -46
  64. package/dist/lib/daemon/machine-checks.d.ts +12 -2
  65. package/dist/lib/daemon/machine-checks.js +27 -10
  66. package/dist/lib/daemon/merge-sections.d.ts +24 -2
  67. package/dist/lib/daemon/merge-sections.js +58 -16
  68. package/dist/lib/daemon/ops/policy.js +4 -2
  69. package/dist/lib/daemon/resolver.js +9 -2
  70. package/dist/lib/daemon/run.d.ts +11 -7
  71. package/dist/lib/daemon/run.js +168 -24
  72. package/dist/lib/daemon/search-index-worker-v1.d.ts +2 -0
  73. package/dist/lib/daemon/search-index-worker-v1.js +25 -0
  74. package/dist/lib/daemon/session-registry.d.ts +0 -1
  75. package/dist/lib/daemon/session-registry.js +0 -3
  76. package/dist/lib/daemon/supervisor.d.ts +3 -1
  77. package/dist/lib/daemon/supervisor.js +1 -1
  78. package/dist/lib/daemon/tcc-eperm.d.ts +59 -4
  79. package/dist/lib/daemon/tcc-eperm.js +110 -8
  80. package/dist/lib/doctor/fix/process-identity.d.ts +20 -2
  81. package/dist/lib/doctor/fix/process-identity.js +48 -5
  82. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  83. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  84. package/dist/lib/hook-engine/canary-gate.js +1 -0
  85. package/dist/lib/hook-engine/native-stop-compatibility.json +2 -1
  86. package/dist/lib/hot-channels/adapters/attio.js +2 -1
  87. package/dist/lib/hot-channels/adapters/meetings.js +2 -1
  88. package/dist/lib/lanes/company-outposts.d.ts +37 -0
  89. package/dist/lib/lanes/company-outposts.js +164 -0
  90. package/dist/lib/lanes/liveness.d.ts +6 -0
  91. package/dist/lib/lanes/liveness.js +49 -8
  92. package/dist/lib/lanes/orphan-report.d.ts +15 -0
  93. package/dist/lib/lanes/orphan-report.js +223 -0
  94. package/dist/lib/lanes/orphan-sweep.d.ts +26 -0
  95. package/dist/lib/lanes/orphan-sweep.js +152 -0
  96. package/dist/lib/lanes/reaper.d.ts +2 -0
  97. package/dist/lib/lanes/reaper.js +11 -8
  98. package/dist/lib/lanes/reconcile.d.ts +8 -7
  99. package/dist/lib/lanes/reconcile.js +39 -0
  100. package/dist/lib/mesh/live/backfill-held.d.ts +13 -0
  101. package/dist/lib/mesh/live/backfill-held.js +23 -0
  102. package/dist/lib/mesh/live/daemon/mode.d.ts +8 -4
  103. package/dist/lib/mesh/live/daemon/mode.js +8 -4
  104. package/dist/lib/mesh/live/daemon/run.d.ts +14 -3
  105. package/dist/lib/mesh/live/daemon/run.js +116 -7
  106. package/dist/lib/mesh/live/direct-drain.d.ts +123 -0
  107. package/dist/lib/mesh/live/direct-drain.js +315 -0
  108. package/dist/lib/mesh/live/emit-replay.d.ts +10 -0
  109. package/dist/lib/mesh/live/emit-replay.js +10 -0
  110. package/dist/lib/mesh/live/flush.d.ts +15 -0
  111. package/dist/lib/mesh/live/flush.js +27 -0
  112. package/dist/lib/mesh/live/liveness-carry.d.ts +45 -0
  113. package/dist/lib/mesh/live/liveness-carry.js +141 -0
  114. package/dist/lib/mesh/live/spool.d.ts +19 -0
  115. package/dist/lib/mesh/live/spool.js +80 -0
  116. package/dist/lib/safe-store.d.ts +2 -0
  117. package/dist/lib/safe-store.js +8 -6
  118. package/dist/lib/search-index/index.d.ts +9 -3
  119. package/dist/lib/search-index/index.js +35 -10
  120. package/dist/lib/search-index/worker-process.d.ts +9 -0
  121. package/dist/lib/search-index/worker-process.js +171 -0
  122. package/dist/lib/session-company-lock.d.ts +3 -1
  123. package/dist/lib/session-company-lock.js +3 -2
  124. package/dist/utils/delegate-command-supervisor.d.ts +3 -0
  125. package/dist/utils/delegate-command-supervisor.js +44 -0
  126. package/dist/utils/delegate-lock.d.ts +12 -0
  127. package/dist/utils/delegate-lock.js +88 -0
  128. package/dist/utils/frontmatter.d.ts +27 -0
  129. package/dist/utils/frontmatter.js +33 -0
  130. package/dist/utils/hook-trust.d.ts +1 -0
  131. package/dist/utils/hook-trust.js +18 -2
  132. package/dist/utils/host-registration.d.ts +13 -1
  133. package/dist/utils/host-registration.js +98 -5
  134. package/dist/utils/package-use-lease.d.ts +1 -1
  135. package/dist/utils/package-use-lease.js +15 -7
  136. package/docs/anywhere-runtime.md +17 -0
  137. package/package.json +9 -8
  138. package/scripts/check-function-manifest.mjs +17 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,162 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.230] — 2026-11-18
6
+ - `hq-hook run --host codex PreToolUse` with no `--hq-root` no longer trusts `HQ_ROOT`, `CLAUDE_PROJECT_DIR` or the cwd as the Codex adapter's root for the explicit-path guard: it keeps a refusal from that fallback root and refuses every other Codex Bash call, because the adapter's root was its own location.
7
+ - The HQ daemon now takes two new hook request notes, `conduct-lanes-link-deliver` and `conduct-link-inherit`, for the two programs the Codex adapter started at SubagentStop (`hq lanes link _deliver` and the conduct-link invite settle). Each note carries only the session id; the daemon runs the HQ root's own `.claude/hooks/conduct-lanes-link-deliver.sh` or `.claude/hooks/conduct-link-inherit.sh` with `PostToolUse` and `{"session_id": ...}` on stdin, as the adapter did, and drops their output as the adapter did on SubagentStop. No hook leaves these notes yet.
8
+ - hq-hook: on Grok Build, native StopCancelled and StopFailure now do the released Grok adapter's own work for them: the Work Mesh `turn_end` line its `70-work-mesh-turn-end.sh` leaf appends to the spool, written in process with no program started, then exit 0 with nothing printed (instead of a hook error). Inputs the port does not model (another leaf revision, the leaf's async queue, a session id that is not a plain name, a value a Windows CR strip would decide differently) are refused natively. `grok-adapter:StopCancelled` and `grok-adapter:StopFailure` are claimed; the settings Stop hooks the adapter runs after the leaf (`master-hook:StopCancelled`, `master-hook:StopFailure`) stay on the old path (US-050).
9
+ - hq-hook: on Grok Build, native PostToolUse now runs the registry's reindex row on the payload the released Grok adapter rebuilt (payload_for_path for writes and edits, the CLAUDE_JSON rebuild for terminal commands) and leaves a request note for the HQ daemon where v16.0.47 and beta.68 ran hq reindex; before, it refused those calls. A call it cannot decide (a carriage return that changes the answer, hq on only one of the inherited and augmented PATHs, a build that is not Unix) is refused, and nothing is started. grok-adapter:PostToolUse stays unclaimed (US-050).
10
+ - hq-hook: `hq-hook run --host grok SessionStart` now does the Grok adapter's company auto-bind natively (`session_auto_bind_apply` with the device default, the session's parent taken from the payload only when it names a subagent type, else `HQ_PARENT_SESSION_ID`), before the skill catalog, as the released adapter does. It shares the Codex SessionStart port, so the device default is read in process and the hook starts no program. Inputs the port does not model bind nothing and print one stderr line. `grok-adapter:SessionStart` is claimed. New parity test against the released adapter and bind library (US-050).
11
+ - Updates the bundled HQ Cloud to 6.18.112. Members of a company can now ask for an Outpost: `hq outposts request-access --company <slug> --outpost <id>` asks to use an existing company Outpost, and `hq outposts request --company <slug>` asks for one of their own. Owners and admins see them with `hq outposts requests --company <slug>` and answer with `hq outposts approve` or `hq outposts decline` (each shows who asked, the price and what access gives, and asks for confirmation unless `--yes`), and manage who can use an Outpost with `hq outposts access list|grant|revoke`. Approved members can use `hq outposts exec` and `terminal` with `--company`. `hq outposts list --company <slug>` gains a CAN_USE column. Creating a company Outpost shows the machine and disk price before asking to confirm. `hq outposts provision` now asks whether to create a company or a personal Outpost; scripts that ran `hq outposts provision --yes` for a personal Outpost now need `--personal`. Also includes sync fixes: two sync processes no longer share one download stage, and a watcher can no longer skip the scheduled full reconcile indefinitely. A session log over the 50 MB sync limit now prints a warning instead of being skipped silently.
12
+ - Hooks: on the local fleet runtime, `hq-hook run --host fleet-local pre_tool_call` now refuses a tool the fleet-local adapter has no HQ name for when `HQ_FLEET_LOCAL_UNKNOWN_TOOL=block`, as the released adapter does. Only the exact value `block` refuses. Before, the native host ignored the setting and passed the tool on.
13
+ - Hooks: the native fleet-local PreToolUse member now follows the released adapter more closely. It blocks with the adapter's message when `core/scripts/lib/hook-adapter-core.sh` is missing. It refuses when the fallback guard scripts would run because `hook-registry.json` is missing or rejected. It matches settings records on the adapter's own tool words (newline-trimmed, word-split, raw and CR-stripped) as well as the native name. It refuses on a non-UTF-8 `HQ_FLEET_HOME`. Its `state.db` reader now skips SQL comments and reads column defaults for older rows.
14
+ - Hooks: the native fleet-local PreToolUse member now matches the released adapter on these points. Settings records match on the adapter's tool words only, so `hq_cli` no longer matches a `Bash` matcher (the line above no longer applies to the native name). The strict unknown-tool check reads `terminal\n` as `terminal`, so it is Bash. A subagent row whose parent comes from the column default, where that parent has no minted scope, now passes. A `core/scripts/lib/hook-adapter-core.sh` that is not byte-equal to a released copy refuses.
15
+ - Hooks: the native fleet-local PreToolUse member now runs the adapter's fallback guard check when the registry prefilter cannot read the payload (no object `tool_input` and a `prompt` that is a number, `true`, an array or an object), as `hqad_iter_registry` does. A payload that is not a JSON object refuses.
16
+ - The native hook engine now claims the old dispatcher's own Notification work on Claude Code and Grok Build (session bind, duplicate-event check, timeout journal, trace lines), so Notification has no unclaimed hook left in the coverage list. If an HQ has a Notification hook the engine does not run, the native Notification does none of that work and prints why on stderr; run `hq reindex` to keep Notification on the old dispatcher while such a hook exists. `hq reindex` still keeps Notification on the old dispatcher until the engine reports `lifecycle-dispatch`.
17
+ - Internal: `hq-hook` stages the released Codex adapter's SubagentStop Agent payload (the `tool_name: Agent` PostToolUse payload it builds with `jq`) and the registry rows that take it, natively. Nothing is wired yet: `hq-hook run --host codex SubagentStop` behaves as before and `codex-adapter:SubagentStop` stays unclaimed.
18
+
19
+ ## [5.345.228] — 2026-11-18
20
+ - `hq auth login` now points people without an account at `https://hqforwork.com` to sign up, instead of the old onboarding wizard at `onboarding.hq.computer`.
21
+ - `hq-hook run --host codex` now does the released Codex adapter's own UserPromptSubmit work and claims it (`codex-adapter:UserPromptSubmit` in `hq-hook capabilities --json`): context is written in the adapter's `jq -n` layout (SessionStart too), a payload with no session id gets the `codex-<id>` session id the adapter stamped, and a payload naming another event is refused with exit 2. `codex-adapter:SessionStart` stays unclaimed.
22
+ - `hq-hook run --host codex PreToolUse` now runs the released Codex adapter's explicit-path guard (`codex-explicit-path-guard.cjs`) natively, without node: a Bash `ls`, `cat`, `head`, `tail`, `wc`, `stat`, `tree`, `find`, `rg`, `grep` or `git` call from the HQ root whose relative path does not exist there is refused with the helper's rewrite hint when `hooks.codex-explicit-path-guard` is on. If the flag cannot be read, the guard runs. `codex-adapter:PreToolUse` stays unclaimed.
23
+ - hq-hook: on Codex and Grok Build, the registered-root pass of the path and command guards also reads an edit's relative path against the registered `--hq-root`, as the released hooks do. A relative `repos/...` edit from a plain folder, a worktree or a folder outside HQ, with `CLAUDE_PROJECT_DIR` set, is now refused (it was allowed). Stricter only: no call that was refused is now allowed.
24
+ - hq-hook: on Codex and Grok Build, the path and command guards now answer each call under both the current HQ root (`CLAUDE_PROJECT_DIR`, else the working folder) and the registered `--hq-root`, and refuse when either refuses. An edit of `<hq>/repos/...` from inside a nested repository is now refused, as the released hooks did (it was allowed). Stricter only: no call that was refused is now allowed.
25
+ - hq-hook: the Codex adapter now also checks `file_path` and `path` trimmed of leading blanks and tabs and trailing blanks, tabs and carriage returns, as the released adapter did, so a padded path into a repository is refused (it was allowed). New released-authority parity test for the repository-worktree-edit rule on Claude Code, Codex and Grok Build.
26
+ - `hq-hook run --host codex PreToolUse` now refuses a tool call naming a sensitive home path (for example `~/.zshrc`, `~/.ssh`, `~/.netrc`) with the released Codex adapter's own exit code and message. A call or `HOME` it cannot check the way the adapter does is refused. `codex-adapter:PreToolUse` stays unclaimed until `codex_explicit_path_guard` is ported natively.
27
+ - hq-hook: `hq-hook run --host codex SessionStart` now does the Codex adapter's own SessionStart work natively, as hq-core v16.0.48-beta.124 does: the company auto-bind with the device default and the checkpoint reprompt guidance. The device default is read from the work-context `config.json` in process, with the same checks `hq mesh context default get --json` makes, so the hook starts no program. Where those files show the command would not answer (it would fail on the config, or `hq` on `PATH` would not start), no device default is bound and one stderr line says so. `codex-adapter:SessionStart` is claimed (with `codex-adapter:UserPromptSubmit`, it was left unclaimed before). New parity test against the released scripts, with a pin check on their bytes, and one table of device-default cases that the real command and the native reader both run (US-050 c1).
28
+ - When another hq command holds the config lock (`.claude.json.hqlock`), the refusal no longer tells you to delete the lock file. It gives the time hq clears the lock by itself, so you can run the command again then. `HQ_CONFIG_LOCK_MAX_HOLD_MS` values below 10 seconds are now raised to 10 seconds, so a tiny value can no longer turn the lock off. The variable is documented in docs/anywhere-runtime.md.
29
+ - The config lock refusal no longer prints a clear time that has already passed. When a lock is past its limit but another program has the file open (on Windows, without delete sharing), the message says hq will clear it once that program closes the file. A lock whose process has exited now shows its real, earlier clear time (30 seconds), not the 10-minute maximum. `HQ_CONFIG_LOCK_MAX_HOLD_MS` values above 7 days are lowered to 7 days.
30
+ - `hq install --global` and MCP registration no longer fail for hours on a leftover config lock (`.claude.json.hqlock`): a lock older than 10 minutes is reclaimed even when its pid still reports alive (reused pid on Windows, or a hung holder). `HQ_CONFIG_LOCK_MAX_HOLD_MS` changes the limit. The refusal for a lock that is still in use now names the lock file and the next step.
31
+ - A config lock file that exists but cannot be read (for example one left by an hq command run as root, a lock path that is a directory, or a symlink whose target is missing) no longer makes hq spin forever at full CPU. hq now waits up to its usual limit, writes nothing, and stops with a message that names the lock and the read error. A lock dated more than its limit in the future whose delete is denied now gets the "past its limit" message instead of a future clear time.
32
+ - core: `archive-old-threads --gated` reads the clock once per run, so a run that crosses midnight no longer takes its cutoff from the next day.
33
+ - `hq core delegate send --manifest <path> --reconcile <eventId>` now records a handoff DM that was already delivered outside the helper: a manifest at status granted, verified or sending moves to sent with the DM eventId, the time and `sentVia: "reconcile"`, and nothing is sent. Before, the command refused `--reconcile` as an unknown argument.
34
+ - core: `hq core handoff finalize` stages the touched and generated paths with one `git add` instead of one per path, so a handoff that touched 5,000 files no longer starts 5,000 git processes (70 s down to under 2 s in the test fixture). If git cannot stage the batch (an ignored path, a path git cannot add, or a git older than 2.25), the finalizer stages each path on its own exactly as before, so the paths it stages, skips and reports under `stage_failures` are unchanged.
35
+ - `hq core register-project --board <company> <board-project-id>` now registers a Board entry with Work Mesh (the older `--brainstorm` spelling still works), clears its pending and prompt-state fields, and syncs the project's stories when it already has a prd.json.
36
+ - `hq core register-project` now refuses to register a project when `HQ_COMPANY_UID` names a different company than the one the project's company records, or when only `HQ_COMPANY_UID` is set and that company is not the active one, and it passes the company's own uid to Work Mesh.
37
+ - Avoid treating dictionary-shaped words as Git commands while preserving command-shape checks inside heredoc bodies.
38
+ - The daemon now restarts itself when macOS cuts it off from the HQ folder and every failing call stops at the same file. Before, the restart added in 5.345.215 needed EPERM on two different paths within 60 seconds, so a daemon whose every hook call failed opening one session `meta.yaml` (after a desktop self-update, with HQ under Documents) never restarted and showed no warning. When three or more reads of one path fail with EPERM inside the window, the daemon now lists the HQ root itself, at most once every 10 seconds: if macOS refuses that with EPERM too, it takes the existing restart path; if the root can be read (one odd file), it does nothing, as before. The restart limits are unchanged: at most 3 restarts in 30 minutes, then the daemon stays up and `hq daemon status` shows the Full Disk Access warning. The `hqd.tcc_eperm` event carries `rootRefused: true` for a restart decided this way.
39
+ - The "HQ needs Full Disk Access" warning (in `hq daemon status` and the daemon log) now names the program macOS checks. When launchd runs the daemon's node binary directly (the LaunchAgent without the HQ.app launcher), the warning names that binary by its path, says allowing the HQ app does not cover it, gives the steps to add it, and says to add it again after a node upgrade (Homebrew changes the path). When HQ.app runs the daemon (desktop host, or the LaunchAgent through the HQ.app launcher) it still says to allow HQ, and a daemon started by hand names the terminal app. The daemon records the launch (and, for a direct node launch, `process.execPath`) in `files-access-needed.json`; a marker with no or an unknown launch keeps the allow-HQ wording, and a missing, relative or multi-line program falls back to a generic "the node program that runs the HQ daemon".
40
+ - The HQ daemon takes a `mesh-session-bind` request note: after a company is bound mid-session, it runs the HQ root's SessionStart Work Mesh hook for that company, with the session id, folder and company that `hq-session.sh` passed when it started the hook itself. The daemon waits for the hook (60 second limit, then its process group is ended) and appends its output to `workspace/logs/work-mesh-hook.log`, as before. It does not check for `jq` first. The native hook engine gains the writer for this note. The writer leaves no note in a session that turned the Work Mesh hook off with `HQ_WORK_MESH_DISABLED` or `HQ_DISABLED_HOOKS`, using the same values as the released hook. Nothing leaves the note yet: the prompt hooks that bind a company still run `hq-session.sh`.
41
+ - The daemon now runs the `/startwork <company>` prefetch that the native intent hint leaves as a request note. It starts the HQ root's `core/scripts/startwork-prefetch.sh --prompt <prompt> --session-id <session>` with `HQ_ROOT` set, as the shell hook did, but with the prompt and session id passed as separate program arguments and no shell. A note with any other field, a session id the script would not accept, or a prompt that is not text under 64 KiB is deleted and nothing runs. The script's exit status is ignored, as before; a run stopped at the 60 s limit counts as a failed try (three tries in all).
42
+ - `hq core delegate` commands that take the delegate lock (grant, verify, send) no longer refuse as "verification or delivery is active" when PATH leaves out the folder that holds `ps` (macOS `/bin`) or Windows PowerShell. The process start-time check now runs `/bin/ps` or `/usr/bin/ps`, or `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe` on Windows, by fixed path; if neither is there the lock still answers busy.
43
+ - Make the rejected-path secret-scan regression use a deterministic GitHub token fixture.
44
+ - Isolate explicit env-file locale fixtures from inherited locale overrides so LANG-only parity cases exercise the intended codeset.
45
+ - `scripts/check-function-manifest.mjs` now fails a run that takes 10 seconds or longer (rule `time-budget`), so the function manifest check stays fast enough to run locally. `--max-seconds <n>` sets another limit. Regression test: `test/ci/function-manifest-check.test.ts`.
46
+ - hq-hook: the HQ-root Git guard now checks a daemon "off" reading of `hooks.hq-root-git-guard-strict` against the flag registry, as the released hook did, and stays strict unless the registry also reads off. Right after the flag was switched on, the daemon could still report off for up to about a minute, so the native hook allowed an `HQ_ALLOW_HQ_ROOT_GIT=1` marker escape and an `ssh … git push` payload that the released hook refused. If the registry cannot be read, the guard stays strict (ledgered as stricter than released).
47
+ - hq-hook: on Grok Build, native Notification now answers as the released Grok adapter does (exit 0, nothing printed) instead of a hook error; the member is scoped to Grok, so Claude Code's Notification answer is unchanged. `grok-adapter:Notification` and `grok-adapter:PostToolUseFailure` are claimed; settings hooks registered under either event (`master-hook:Notification`, `master-hook:PostToolUseFailure`) stay on the old path (US-050).
48
+ - hq-hook: on Grok Build, native PermissionDenied and PostCompact now answer as the released Grok adapter does (exit 0, nothing printed, no hook started) instead of a hook error, and `grok-adapter:PermissionDenied` and `grok-adapter:PostCompact` are claimed; settings hooks registered under either event stay on the old path (US-050).
49
+ - hq-hook: the native Grok PostToolUse port now models the Grok adapter's `auto-capture-registry` supplement on every Bash call, as the v16.0.47 and beta.68 adapters run it: the profile gate is asked first and no released gate lets it run, so nothing happens. A gate that would let it run, or one the engine cannot read, is refused natively. `grok-adapter:PostToolUse` is still not claimed.
50
+ - On Grok, a native `list_dir`, `ListDir` or `Glob` call whose target resolves to the HQ root (for example `target_directory: "."` from the root) is now refused with the message the released adapter gives, instead of being allowed (`list_dir`) or refused in other words (`Glob`). Where `--hq-root` goes through a symlink, a target naming the physical root (the root the adapter compares against) is refused too.
51
+ - On Grok, a native `list_dir`, `ListDir` or `Glob` call with no target directory or path is now refused with the released adapter's own message, as the adapter does, instead of being allowed (`list_dir`) or refused in other words (`Glob`).
52
+ - hq-hook: the Grok Build adapter now also checks `file_path`, `path`, `target_file` and `target_directory` trimmed of leading and trailing white space, next to the raw path, so a padded path into a repository (for example `" repos/private/app/x.rs"`) is refused. The released Grok adapter passed it untrimmed and allowed the edit; this is stricter than released.
53
+ - On Grok, the native sensitive home path check now refuses a command, path or tool name that matches once carriage returns are removed, as the released adapter does on Windows, so a call such as `cat ~/.ss<CR>h/id_rsa` is never allowed natively.
54
+ - hq-hook: on Grok Build, native Stop and SubagentStop follow the released Grok adapter: the consecutive-block cap (`HQ_GROK_STOP_BLOCK_MAX`, default 3, counter under `workspace/orchestrator/hook-state/`, WARNING on stderr when hit, naming the gate by the adapter's hook id), `HQ_STOP_DECISION_DELIVERABLE=1` on a deliverable Stop, the block reason compacted as the adapter writes it (one line, at most 8000 characters), and nothing printed on the session-close Stop (US-050).
55
+ - Render Grok's Windows bridge and project-hook registrations with absolute quoted paths. Convert PreToolUse launch failures to the host's blocking exit status and refuse unrepresentable paths before publishing trust.
56
+ - Hooks: a write to a story's conditional-differences or side-effect-differences replay ledger, or to the replay harness's test, now asks for approval, as writes to the intended-differences ledgers already did. CODEOWNERS requests the owner's review for the same files.
57
+ - Hooks: the native dispatcher now honours a registry hook's `prefilter.re_all` the way master-hook does: the hook runs when `prefilter.re` matches or when every `re_all` regex matches, and a malformed `re_all` regex runs the hook fail-closed. Before, it ignored `re_all` and could skip a safety guard such as `block-hq-root-git-mutation` on a command like `${G:-gi}t commit` that the shell dispatcher runs it on. A `re_all` value the native side cannot evaluate exactly now hands the event to the shell. Native hook index files move to format 5 and are rebuilt.
58
+ - hq-hook: on hq-fleet-local, a session start reuses the adapter's session-start cache as the adapter does, and otherwise takes its cache lock and in-flight marker and hands the `.claude/settings.json` SessionStart commands to the HQ daemon on a new `fleet-session-start` request note; the daemon runs them with the new `hq-hook fleet-settings SessionStart` (only that dispatch, checked against the root), writes the cache and clears the marker and the lock. The adapter's SessionStart work is not claimed yet, so the shell adapter still answers it.
59
+ - hq-hook: on hq-fleet-local, the extra `.claude/settings.json` commands the fleet-local adapter runs after a tool call now go to the HQ daemon on a `fleet-local-settings` request note, and the daemon runs them a moment later under its hard time limit, only while the root's settings file still lists them; `hq-hook run` claims the adapter's PostToolUse work. Session start, prompt submit, session end and SubagentStop stay on the shell.
60
+ - CI: pull requests that change the Grok PostToolUse port, its comparison test or the pinned files it compares against now run that comparison test on Linux in its own job. Other pull requests skip it.
61
+ - Hooks: Notification, SubagentStart, SubagentStop and the Grok-only events (StopCancelled, StopFailure, PostToolUseFailure, PermissionDenied, PostCompact) now have a switch rule: `hq reindex` moves them to the new hook engine only once it reports the `lifecycle-dispatch` evaluator, and until then they stay on the old dispatcher. If such an event does reach an engine with no evaluator for it, `hq-hook run` reports a hook error that names the event and `hq reindex`, instead of allowing it silently. Grok's PostToolUseFailure is the exception: as with the released Grok adapter, `hq-hook run` prints nothing for it and exits 0.
62
+ - CI: the hq-hook Linux pull-request tests run as two parallel shards, so the job finishes inside its 40-minute limit.
63
+ - The Work Mesh tool-writes PostToolUse hook (`core/hooks/PostToolUse/35-work-mesh-tool-writes.sh`) now runs natively in `hq-hook` on Claude Code, and starts no program on the hot path. It bumps the session's `toolWrites` counter without jq, takes the same flight locks, and leaves a `mesh-tool-writes` daemon note. The HQ daemon then runs `hq mesh context bind-project` (with the success marker or back-off) or `hq mesh context prd-sync` (with the per-version probe). A state file the jq path would not change, or one reached through a link, is left untouched. Inputs the port does not model are refused rather than guessed at: other hosts, non-Unix builds, a payload that is not UTF-8, Unicode spaces, and an octal or overlong `HQ_WM_BIND_BACKOFF_SEC`.
64
+ - hq-hook: the native PreToolUse core now claims `block-hq-root-git-mutation`, `block-unsafe-package-install` and `env-file-no-trailing-newline`, with parity against the old dispatcher's handling of each (switched off, profiles, the `HQ_ALLOW_UNSAFE_INSTALL` override and its audit row). A Git mutation run through `sudo -D DIR` or `sudo --chdir DIR` is now refused natively; before, `sudo -D <HQ root> git push` got through the native check.
65
+ - `hq-hook` now claims the `super-conductor-merge-gate` PreToolUse hook: its owner-approval check already runs in process (#2979), so the old dispatcher's copy counts as covered once PreToolUse switches to the new core.
66
+ - CI: two hq-hook parity tests no longer fail at random on Linux runners. The env-file test accepts both of jq 1.7.1's spellings for a document that starts with the lone token `n` (jq 1.7.1 reads a stale byte there), while the native message stays exact. The intent-hint test no longer fails when the shell hook exits before it reads its input; exit code, stderr and output are still compared in full.
67
+ - `hq-hook run` now answers the SessionStart `welcome-brief-ready` hook natively. It is a daemon machine check, so it is skipped when the daemon owns the checks; otherwise it announces the ready welcome brief once, as the shell hook did. Inputs the native code does not model are refused instead of being guessed.
68
+ - CI: the Linux legs of the hq-hook workflow (release tags, the Monday run and manual runs) run their test list as four parallel shards within the existing 60-minute job, with each credential-guard corpus on its own shard; the serial list had run past the timeout. macOS and Windows are unchanged.
69
+ - The native hook engine now answers the SessionStart half of `block-hq-worktree-session` itself: it shows its worktree banner at SessionStart, byte for byte the shell hook's text, when the session's HQ root or working folder is a linked worktree of HQ.
70
+ - Tests: the hq-hook unit tests that need the Unix state store, the Unix path model or a Unix shell harness now run on Unix only, and Windows tests assert what those calls do on Windows (refused, or nothing written). The native spawn-company-handoff row no longer opens `/dev/urandom` on Windows.
71
+ - Open jq reference images nonblocking and validate the opened file descriptor before bounded reads.
72
+ - `hq lanes create --outpost` accepts a company Outpost id (`outpost_<companyUid>` or `opc_<id>`) of the lane's company and sends the lane there through the company target, and `--placement auto` also measures the lane company's ready Outposts the caller can use. Only a company Outpost the server marks as set up for lanes (`lanesReady`) is used: any other is refused with "not set up for lanes yet" and left out of automatic placement without being contacted. Another company's Outpost is refused, and a member who has not been approved for the Outpost is told the command to request access (`hq outposts request-access --company <slug> --outpost <id>`, or `hq outposts request --company <slug>` for an Outpost of their own) for an owner or admin to approve. If the company's Outpost list cannot be read, automatic placement continues with personal Outposts and reports the company as skipped. Personal Outposts work as before.
73
+ - `hq index sync` no longer stops when one of your own qmd collections already
74
+ covers a folder HQ indexes. It skips that folder, prints one notice naming the
75
+ folder and your collection, leaves your collection untouched, and updates the
76
+ rest of the search index.
77
+ - Prepare the native SessionStart worktree banner for parity testing against the released hook.
78
+ - Work Mesh: on a machine in emit mode `direct`, the daemon now delivers the session and turn events the hooks write to the spool, so a session's turns reach its company's board. Before this, nothing sent them and the spool file grew without limit. Events queued before the first run of the new delivery are moved to `~/.hq/work-mesh/pre-drain-backlog/` and are not sent. A session with no company is held, not sent. `hq lanes` keeps each session's last event after its lines are delivered.
79
+ - The native `mesh-tool-writes` PostToolUse member now models how the released Codex adapter hands a `web_search` or `WebSearch` call to master-hook (`tool_name` rewritten to `WebSearch`, compact JSON), so it answers as the adapter does (no write counted, nothing printed) instead of refusing. A payload whose carriage returns would change which web search branch is taken is still refused. `codex-adapter:PostToolUse` stays unclaimed.
80
+ - Add native Skill ownership checks and update native scope and credential decisions for current shell semantics. Keep indirect temporary-file removal through xargs refused and native coverage claims gated on parity review.
81
+ - `/newcompany` can bind the new company slug after it is listed in the companies manifest, even before `companies/<slug>/` exists. A symlink or case-alias at that slug still fails closed.
82
+ - Make Stop observation checks deterministic while keeping native observations complete when the shell loses a matched pattern to a pipe race.
83
+ - hq-hook claims image-context-guard for PreToolUse: its native image budget (2 MB per image, 8 MB and 32 images per context) matches the released guard and its ledgers on Claude Code, Codex and Grok Build.
84
+ - hq-hook claims the repository-worktree folder hook for PreToolUse; the repository-worktree-edit command rule already answers it natively.
85
+ - hq-hook: on hq-core v16.0.48-beta.124, block-core-writes answers natively through the bridge instead of handing every call back to bash (script a39061417 and hook-lib 9133295e are now pinned). Like that script, it blocks hook input jq cannot parse cleanly and, on Git Bash, compares paths without regard to ASCII case; it refuses paths with an 8.3 short name or a non-ASCII cased letter there.
86
+ - The native hook engine now runs `50-command-report-details` at UserPromptSubmit without starting any program: on `/handoff`, `/learn` and `/checkpoint` it adds the expandable-report guidance while the company flag `output.command-report-details-expandable` is on, reading the flag from the CLI's cached snapshot where the shell hook fetched it live, with parity tests against the released shell hook.
87
+ - Refuse code-loading, inspection, malformed or unclassified NODE_OPTIONS on native gate paths that use Node helpers, while allowing known-safe memory and diagnostic flags with equals-only numeric values and a bounded stack-trace limit.
88
+ - Fix native hook build identification: report the CLI release and source/build fingerprint with the engine version so host canaries cannot be reused for another build of the same release.
89
+ - Match native Grok PostToolUse payload limits to the adapter’s jq argument and environment byte limits instead of a 64 KiB aggregate cap.
90
+ - Recover abandoned native delegation locks using process identity and bound grant subprocess waits, while preserving active or unknown lock owners.
91
+ - Prevent concurrent delegation transfer, repository handover, secret handover, and pickup updates from overwriting each other's manifest records.
92
+ - Reproduce the released hq-core v16.0.47 Grok PostToolUse adapter alongside beta.68, with exact adapter/core generation pairs and shared parity coverage.
93
+ - The native hook engine now answers the `reindex` PostToolUse hook: when a Write, Edit, MultiEdit or Bash call creates, edits, moves or deletes a skill, a worker or a personal-overlay entry, it leaves a `reindex` request note and the HQ daemon runs `hq reindex` a moment later. The hook itself starts no program. Nothing is re-indexed while no daemon runs for that HQ root; run `hq reindex` by hand then.
94
+ - A reindex started by a hook (`hq reindex --from-hook`, which the daemon runs for a hook's request note) no longer changes which core a host's hook registrations call: with a missing or stale host canary record it keeps Claude Code, Codex and Grok Build on the new core, and with a passing canary it does not move a host on the old dispatcher to the new core. It prints one warning per host when the gate would have changed it. A manual `hq reindex` still applies the host canary gate.
95
+ - The native scope guard now refuses `$((...))`, `$[...]` and counting command substitutions (`$(wc -l < f)`, `$(grep -c x f)`) in path operands where the bash scope guard refuses them, instead of reading them as the number 0.
96
+ - Refuse unresolved shell runtime values, implicit builtin writes and deferred DEBUG handlers in native scope decisions without activating the native scope guard; preserve runtime provenance for wait output targets and record unresolved exported PATH refusals.
97
+ - Run the spawn-company-handoff UserPromptSubmit row natively: the child session is bound to the parent's company in process, with no bash started, a parent locked to several companies is ported as `hq-session.sh add company` per extra company (its company-less Work Mesh register goes to the HQ daemon on a new `mesh-session-register` note), and an unreadable child session file is refused.
98
+ - Match native Stop monitor commands and remedies to each pinned hq-core revision, including hq runners in current releases.
99
+ - Reject parent traversal and absolute custom sync paths before sending membership requests.
100
+ - `hq resolve-company` now answers through the same resolver as the `hq_resolve_company` MCP tool and hqd, so a folder linked to a company missing from companies/manifest.yaml now resolves to no company there too. The companies/<slug> layout fallback for your own HQ root now lives in that shared resolver, so the MCP tool and hqd resolve those folders the same way the CLI does.
101
+ - `hq repo add` now also records the checkout in the folder-to-company registry that `hq link` writes, so `hq resolve-company`, hqd and the MCP tool resolve it straight away instead of after the next `hq install --global`. An existing `hq link` binding for that folder is kept, and `hq repo add` warns when it names another company.
102
+ - hq-hook: with the replay recorder on, `hq-hook run` now records every event it answers on every host (allows, refusals and events with nothing to say), with the host, event, redacted payload, decision and injected context. The text the user typed is left out: `prompt`, `userPrompt`, PreCompact's `custom_instructions` (the text after `/compact`) and, on the prompt event, `content` are dropped from the payload, and the record keeps only that each was there and its length. The recorder setup now runs while the event is evaluated, so recording adds about 0.5 ms per event (US-004 c1-c3, c5).
103
+ - hq-hook: `hq-hook run` now records a guard refusal (PreToolUse, exit 2) to the replay recorder when it is on, with the host, event, redacted payload and decision. Refusals under Codex, Grok Build and the local-bot adapter were never recorded before (US-004 c5).
104
+ - hq-hook: Grok prompt context held for the next tool result is now cut by evaluator priority, keeps its rank, and competes by that rank with the tool result's context inside Grok's 10,000-unit limit, instead of always yielding to it. Members are told what was kept after these cuts.
105
+ - The native hook engine has a SessionStart port of the daily vault access refresh (`refresh-vault-access`) for Claude Code, Codex, Grok Build and agents-v2, and claims that hook in its SessionStart cover list. The hook still returns at once; the refresh runs in a detached `hq-hook` child that starts `hq core refresh-vault-access`, stops it after 60 s, and runs at most one refresh per HQ root at a time. The CLI version floor check of the shell hook is gone.
106
+ - The native hook engine has a SessionStart port of the stale review base repair (`repair-stale-review-base`) for Claude Code, Codex, Grok Build and agents-v2, and claims that hook in its SessionStart cover list. It starts only `git`, each call under a time limit. On fleet-local, where the adapter never ran the hook, nothing changes, and the port does nothing on Windows.
107
+ - The native hook engine now answers five more SessionStart checks itself: the active-runs banner, the hq-cli update check, the client health check, the setup reminder and the fingerprint hooks check. When the hooks own the machine checks (no daemon has taken them), SessionStart no longer installs hq-cli updates, runs `hq doctor --fix`, files `hq feedback` bug reports or changes your global git config: the daemon runs those checks and the machine-check notice shows what it found. The active-runs banner and the setup reminder read the same files and print the same text as before, but the banner no longer rewrites `workspace/orchestrator/active-runs.json`, and on an input either one does not model (for example a relative `HQ_ROOT`, an unset `PATH` or an oddly formed registry entry) it shows nothing and stops the SessionStart chain: the hooks after it add nothing for that session, while the hooks before it, such as the policy injection, still add their context.
108
+ When the hooks own the machine checks and the native hook engine answers SessionStart, the hq-cli update check and the client health check no longer run inside the session start: each leaves a request for the HQ daemon, which runs that one check on its next pass. The update, repair and bug report therefore happen a little after the session starts, and not at all while no daemon is running.
109
+ - `hq core delegate run` runs the whole delegation in one command: resolve the recipient, build or resume the bundle, grant, repo handover, secrets, ownership transfer, verify and send, stopping at the first failed step. It prints one JSON line with the outcome and says plainly when grants are already live but the flow stopped. `hq core handoff run` does the same for the mechanical part of a handoff (knowledge commit, finalize, detached post, auto-file, builder route). The last four handoff helpers without a TypeScript twin are now native too: `hq core handoff pointer-company`, `builder-route`, `autofile` and `archive-decision`. (US-029)
110
+ - Read Markdown frontmatter fences through one shared splitter in the checkpoint ontology files and the Attio and meetings hot-channel adapters, with an inventory test that fails on any new copy.
111
+ - Fold the copy of the HQ-root check in the lazy command loader into the shared `isHqRoot`, and add an inventory test that fails when another copy appears (US-030 c2, stage 2 of 4).
112
+ - Move runner orphan checks and stale marker cleanup into daemon reconciliation, preserve timestamped reports and uncertain markers, and stop launching the sweep during session start. Use a bounded Darwin snapshot for running orphan counts.
113
+ - `hq mesh session <verb> --enqueue` for a hook-tracked session (one with local session state) now appends one line to the Work Mesh spool and makes no network call, as its help says; the session lifecycle verbs (`start`, `turn-start`, `turn-end`, `end`) do so with or without `--enqueue`. The daemon delivers the spool. Such a call refuses `--touched-path` and `--repo-path`, which the spool cannot carry, instead of dropping them. A session with no local state (the lane runner, `hq-delegate-transfer.sh`) keeps the old direct post with all its flags, and so does a hand-run `task-status`, `blocked` or `note` without `--enqueue`. (US-038 c1)
114
+ - The native hook engine gains an in-process version of the parts of the `40-skill-command-script` UserPromptSubmit hook that start no program: its off switches, the slash-command parse, the cross-company refusal and the skill folder lookup. It tells whether the shell hook would run a skill's `command.sh` for a prompt. Nothing calls it yet and the hook is not claimed; it still runs on the shell path.
115
+ - `hq-hook` now runs the native intent-hint port (UP-6) for UserPromptSubmit and claims `intent-hint`, so `intent-hint.sh` no longer runs as a hook on any host. A `/startwork <argument>` prompt gets the same hint as the released hook and leaves one `startwork-prefetch` note for the HQ daemon instead of starting the prefetch script; a note that cannot be left refuses the prompt.
116
+ - `hq-hook` intent-hint: a `/startwork` prefetch whose session id is over 512 bytes, which the HQ daemon would drop unrun, is now refused; the US-049 UP-6 ledgers no longer say the member is unregistered.
117
+ - The native intent-hint port (not registered yet; `intent-hint.sh` still runs as a hook) no longer refuses a `/startwork <argument>` prompt. It gives the same hint as the released hook and, in place of starting `startwork-prefetch.sh`, leaves one `startwork-prefetch` request note for the HQ daemon. A note that cannot be left still refuses the prompt. The daemon does not run this kind of note yet.
118
+ - hq-hook: new released-authority parity tests compare the agent-secret-reveal and git-repository-anchor rules with the hq-core-staging v16.0.48-beta.124 hooks (block-agent-secrets-reveal, block-hq-root-git-mutation and their flag companions) on Claude Code, Codex and Grok Build, through `hq-hook run`.
119
+ - hq-hook: released-authority tests record that the native package-install rule keeps refusing when HQ_ALLOW_UNSAFE_INSTALL=1 is set (the released hook allowed and audited it), and that Codex and Grok Build show the native repository-worktree-edit refusal text.
120
+ - hq-hook: the owner-approval merge gate of a conducted session (super-conductor-merge-gate) is decided in process from the session's conduct link and the link's decision queue at call time, with the shell hook's parsing rules and refusal texts; a recorded differential fixture from the shell hook drives the binary. Not yet claimed as covering the shell hook.
121
+ - hq-hook: on Claude Code the image command rule runs the byte-exact port of image-context-guard in process (no program started), accepts the hook library of hq-core-staging main (9133295e) as well as core 16.0.45 to 16.0.47, and writes its ledger through the host store, refusing a ledger behind a link below the HQ root (a symlinked HQ root works as it did under the script) and refusing image reads when the installed image-context-guard.sh is not a version the port models (US-048 M1).
122
+ - The native hook engine's merge-hold check now decides as `hq runners hold check` does: by target repository, from the hold records under workspace/lanes/holds read in process, for every session whatever company it is bound to. It refuses when a record cannot be trusted or the owning company's flag is not in fresh daemon state. Not registered on any host yet.
123
+ - hq-hook: the native merge gate decides the review-before-merge half of `hq runners hold check` from the lane and review records, and the flag registry when the daemon reads the flag as off, in process (unclaimed; the shell hook still runs).
124
+ - hq-hook: on Claude Code the new hook engine checks edits under `repos/` with the same rule and message as the `block-repo-edits-use-worktree` hook it replaces. Not yet switched on for any host. Where the installed hook or its library is a version hq-cli does not know, the edit is refused when either the known hook version or the built-in rule would refuse it, with the built-in message.
125
+ - The HQ daemon now picks the company for a native share suggestion with the same rule as the released shell hook. It uses the session's scope capability lock set, or the session's `company_slug` when that set is empty, unreadable or absent. Sessions whose company starts with `_`, is longer than 64 characters, is `personal` or has no folder yet now get the suggestion the shell gave, and so do sessions whose lock set names a company with no folder. A suggestion still grants nothing; sharing still asks first.
126
+ - The native hook engine now registers its `hq-auto-acl-suggest` PostToolUse check and claims it in `hq-hook capabilities --json`. On Claude Code, a qualifying write, edit, deploy or completion call leaves one `acl-suggest` request note, and the HQ daemon stores the same read-access share suggestion the released shell hook made, including paths written as `x/../y` or `//`, paths with `:`, and a Bash path whose company folder is the session's company in another spelling. The daemon now skips a suggestion it cannot classify instead of dropping the whole request. On Codex, Grok and fleet hosts, and on builds that are not Unix, a call the check would act on is now blocked with one line.
127
+ - `hq-hook` now uses the native Codex and Grok adapter models for Work Mesh tool writes on PostToolUse. The models preserve the released adapter input and leave requests for the daemon. The fleet-local model remains available for parity tests.
128
+ - The HQ daemon takes a second kind of request note from the native hook engine, `autocommit`: for one edited path it runs the HQ root's own `.claude/hooks/hq-autocommit.sh`, which makes the `autosave(hq): <path>` commit. Nothing is committed for a note until a daemon runs for that HQ root.
129
+ - The native hook engine gains an `hq-autocommit` PostToolUse check that leaves that note instead of starting git. The check is not registered yet: `hq-autocommit.sh` still runs as a hook.
130
+ - When that autosave fails, the daemon leaves a small file for the session and the native check shows one fixed warning on the session's next Write or Edit, once per session. A script that runs past its limit is ended with every program it started (SIGTERM to its process group, then SIGKILL) and its lock is released; while another autosave holds the script's lock the note waits and is not counted as a try.
131
+ - The HQ daemon takes a second kind of request note, `plan-sync`: it hands an approved plan to the HQ root's own `core/scripts/session-project.sh ingest-plan`, with the plan text read from a private file beside the note. Nothing is filed under the session's project until a daemon runs.
132
+ - The native hook engine gains a `native-plan-project-sync` PostToolUse check that leaves that note instead of starting the helper. The check is not registered yet: `native-plan-project-sync.sh` still runs.
133
+ - The HQ daemon takes a third kind of request note from the native hook engine, `pr-footer`: a few seconds after a raw `gh pr create` it adds the `HQ-Fingerprint:` footer to the new pull request's body with `gh pr edit`, reading the body again just before it writes. Each program it starts has a 20 second limit, and one that reaches it is ended with its process group. The footer is not added while no daemon runs for that HQ root.
134
+ - The native hook engine gains a `pr-fingerprint-footer` PostToolUse check that decides, without starting a program, whether a Bash call was a raw `gh pr create`, and leaves that note. The check is not registered yet: `pr-fingerprint-footer.sh` still runs as a hook.
135
+ - The native hook engine now does the old dispatcher's own PostToolUse work in process: it binds the session, skips the twin of a tool call that already ran, opens the timeout journal and writes the trace lines, and keeps a redacted tool output next to a block. PostToolUse stays on the shell dispatcher until every PostToolUse hook is ported.
136
+ - The native hook engine now does the old dispatcher's own SessionEnd work in process: it binds the session, skips the twin of a SessionEnd that already ran, and writes the timeout journal rows and trace lines. Once SessionEnd is switched to the new core, a SessionEnd hook added since the last `hq reindex` makes the engine refuse the event, as PreCompact already does. SessionEnd stays on the shell dispatcher until the daemon's `session.close` is sent as a request note.
137
+ - The native hook engine now has the old dispatcher's own SessionStart and UserPromptSubmit work, not yet switched on: the session bind, the duplicate-event check, the main-thread company scope, the nested-install warning, the Monitor-timeout skips, which hooks the old dispatcher ran in what order, and how it combined their output under the context budget. Both events stay on the shell dispatcher until every hook of the event is ported.
138
+ - The hook engine can now ask the HQ daemon to close a session with a request note (`session-close`), the work the old dispatcher did by sending `session.close` over the daemon socket on SessionEnd. The daemon closes the session in its own session registry and starts no program. Nothing leaves this note yet; the native SessionEnd will once it is switched on.
139
+ - The hook engine now claims SessionEnd in full (the old dispatcher's own work and the Codex and Grok adapter step), so `hq reindex` can switch SessionEnd to the native engine on macOS and Linux when core.next is on. The native SessionEnd leaves the daemon's `session.close` as a request note. A SessionEnd hook added after the switch makes the event refuse natively until `hq reindex` runs again. Windows keeps shell registration.
140
+ - Native Claude PostToolUse suggests checkpoints using in-process Git status. The hook runs at most one working-folder scan per session in five minutes.
141
+ - The native PostToolUse evaluator now covers HQ autocommit and plan sync by queuing requests for the daemon. Reindex continues through its shell hook.
142
+ - The native hook engine can now run `hq-session.sh set company_slug` and `set mode` in process (`session_set`) without starting any program, with parity tests against the pinned v16.0.48-beta.124 script. The native natural-language-router port uses it for its first-prompt company bind. The port is still not registered and the hook stays on the shell: where the Work Mesh SessionStart hook is installed, the bind would register the session with the mesh, and no daemon request does that yet, so the port refuses that prompt.
143
+ - The native natural-language-router is now registered and claimed at UserPromptSubmit, so the hook no longer runs on the shell. Where the Work Mesh SessionStart hook is installed, the first-prompt company bind now leaves a mesh-session-bind note for the HQ daemon instead of refusing; a bind the note cannot carry is still refused, as before. No program is started.
144
+ - The native hook engine now names the session at SessionStart and UserPromptSubmit the way `session-title` did, without starting any program: the same title from the project marker, mode command and orchestrator state, the one-time first-turn naming instruction, and the same back-off after a manual rename. The host answer gains a title action: Claude Code receives it as `sessionTitle`; Codex and Grok have no documented title field, so the title is dropped with a line on stderr. Parity tests run against the released shell hook.
145
+ - hq-hook and the daemon: the work-mesh SessionStart port leaves its reconcile and pending-registration work as request notes, and the HQ daemon does it without bash (US-049, part 3; unregistered).
146
+ - `hq-hook` gains a native version of the SessionStart work-mesh hook's foreground (`session_start_mesh::hook`): the `session_start` spool line, the live-binding marker, the observation file and the offline preflight with its cache, checked file for file against the shell hook. No hook uses it yet: the SessionStart work-mesh hook still runs as a shell hook.
147
+ - The native hook engine gains an in-process version of the first-prompt company-mention library and of the conditions under which the `natural-language-router` hook rebinds a session (second of five parts). Nothing calls it yet; the hook still runs on the shell path.
148
+ - hq-hook: on Grok Build, native PreToolUse now refuses a shell call, read, edit or write that names a sensitive home path (~/.ssh, ~/.aws/credentials, ~/.zshrc and the rest of the released adapter's list) with the released Grok adapter's exact answer; before, native allowed several of them (US-050 c1).
149
+ - hq-hook: on Grok Build, native SessionStart now writes the released Grok adapter's skill catalog (workspace/sessions/<session>/skill-catalog.txt) byte for byte; grok-adapter:SessionStart stays unclaimed until the adapter's company bind is ported (US-050 c1).
150
+ - The native hook engine now has the old dispatcher's own work on the lifecycle events, not yet switched on: Claude Code's Notification, SubagentStart and SubagentStop, and Grok Build's Notification, PermissionDenied, PostCompact, PostToolUseFailure, StopCancelled, StopFailure, SubagentStart and SubagentStop. It covers the session bind, the duplicate-event check, the Grok adapter's payload, which hooks the old dispatcher ran in what order, and how it combined their output. These events stay on the shell dispatcher until every hook of each is ported.
151
+ - Match released Codex Stop JSON formatting and label forced Work Mesh turn-end records as Codex while preserving Stop evaluation.
152
+ - The native hook engine now has the old dispatcher's own work on a Claude Code PreToolUse, not yet switched on: the required-tool check, the session bind, the duplicate-event check, the timeout journal and the trace lines. PreToolUse stays on the shell dispatcher until every PreToolUse hook is ported.
153
+ - The daemon runs its scheduled search-index pass in a supervised worker and can stop an active qmd process when the index job is stopped.
154
+ - Make vault flag snapshot parity deterministic with fixed lookup inputs and a virtual deadline, retaining transport and full-reader coverage.
155
+ - Add a manual hook-package verification path that checks published bytes without rebuilding, signing, or publishing again.
156
+ - core: `verify-story-deliverables` keeps its 15 s limit on each URL check; the timer can now be injected so tests end a stalled check without waiting 15 s. No change for users.
157
+ - Keep native review checks fail-closed on Windows when a review record path passes through a file.
158
+ - Resolve native Windows project roots and payload paths before company-scope checks, and refuse unsupported UNC, verbatim, and drive-relative inputs.
159
+ - Keep native merge-hold checks fail-closed when the hold storage path is unusable on Windows.
160
+
5
161
  ## [5.345.226] — 2026-11-17
6
162
  - `hq sync release-held` restores an identity file sync cannot read and keeps those uploads held until you review them. When no saved history names an account, or the history names more than one person, it tells you to run `hq sync release-held --confirm-unproven` on this computer. That restores the file and keeps every upload held until you confirm which files are yours. A hold that lists no files stays in place. Run `hq sync` once, then run `hq sync release-held` and confirm the files it names. When the history names one other account, it tells you to sign in as that account and run `hq sync release-held`. `hq sync held` names `hq sync release-held` while the file cannot be read. Saying yes to `--confirm-unproven`, including with `--yes`, does not release uploads that already list files. Run `hq sync release-held` again without that flag and confirm the files it names. Declining the prompt releases nothing.
7
163
  - `hq daemon status` (text and `--json`) has a `lanes-reconcile` line again when the daemon reconciles lanes in process. It shows the last run time and result; a failed run reads `last run failed: <error>` (one line, secrets removed, at most 300 bytes, also `lastError` in `--json`), and a failed run on a signed-out machine reads `waiting not signed in (run `hq login`)` like the other services. Before, a reconcile failing every 15 seconds was visible only in `daemon.log`.