@scotthuang/agent-knock-knock 0.15.0 → 0.16.1

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 (159) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/connectors/deepseek-harness/README.md +53 -13
  3. package/connectors/pi/README.md +38 -11
  4. package/dist/src/claude-conversation-routing-cli-adapter.js +5 -1
  5. package/dist/src/claude-conversation-routing-cli-adapter.js.map +1 -1
  6. package/dist/src/claude-managed-send-route.d.ts +2 -0
  7. package/dist/src/claude-managed-send-route.js +20 -3
  8. package/dist/src/claude-managed-send-route.js.map +1 -1
  9. package/dist/src/claude-terminal-agent-observation.d.ts +2 -0
  10. package/dist/src/claude-terminal-agent-observation.js +18 -1
  11. package/dist/src/claude-terminal-agent-observation.js.map +1 -1
  12. package/dist/src/claude-terminal-registry-observation.d.ts +12 -0
  13. package/dist/src/claude-terminal-registry-observation.js +32 -0
  14. package/dist/src/claude-terminal-registry-observation.js.map +1 -1
  15. package/dist/src/claude-user-explicit-input-proof.d.ts +9 -0
  16. package/dist/src/claude-user-explicit-input-proof.js +90 -0
  17. package/dist/src/claude-user-explicit-input-proof.js.map +1 -0
  18. package/dist/src/cli-core.js +8 -4
  19. package/dist/src/cli-core.js.map +1 -1
  20. package/dist/src/cli-usage.js +1 -0
  21. package/dist/src/cli-usage.js.map +1 -1
  22. package/dist/src/conversation-list.d.ts +3 -3
  23. package/dist/src/conversation-list.js +38 -14
  24. package/dist/src/conversation-list.js.map +1 -1
  25. package/dist/src/conversation-routing-cli-adapter.js +49 -2
  26. package/dist/src/conversation-routing-cli-adapter.js.map +1 -1
  27. package/dist/src/conversation-usage-guidance.d.ts +4 -0
  28. package/dist/src/conversation-usage-guidance.js +240 -0
  29. package/dist/src/conversation-usage-guidance.js.map +1 -0
  30. package/dist/src/host-adapter.js +3 -2
  31. package/dist/src/host-adapter.js.map +1 -1
  32. package/dist/src/managed-session.d.ts +11 -0
  33. package/dist/src/managed-session.js +24 -1
  34. package/dist/src/managed-session.js.map +1 -1
  35. package/dist/src/native-store-authority-cli-adapter.d.ts +20 -0
  36. package/dist/src/native-store-authority-cli-adapter.js +105 -0
  37. package/dist/src/native-store-authority-cli-adapter.js.map +1 -0
  38. package/dist/src/native-store-authority-ledger.d.ts +3 -0
  39. package/dist/src/native-store-authority-ledger.js +46 -0
  40. package/dist/src/native-store-authority-ledger.js.map +1 -0
  41. package/dist/src/native-store-authority-projection.d.ts +6 -0
  42. package/dist/src/native-store-authority-projection.js +68 -0
  43. package/dist/src/native-store-authority-projection.js.map +1 -0
  44. package/dist/src/native-store-authority-runtime.d.ts +9 -0
  45. package/dist/src/native-store-authority-runtime.js +77 -0
  46. package/dist/src/native-store-authority-runtime.js.map +1 -0
  47. package/dist/src/native-store-authority-transfer.d.ts +31 -0
  48. package/dist/src/native-store-authority-transfer.js +172 -0
  49. package/dist/src/native-store-authority-transfer.js.map +1 -0
  50. package/dist/src/native-store-authority-watch.d.ts +9 -0
  51. package/dist/src/native-store-authority-watch.js +43 -0
  52. package/dist/src/native-store-authority-watch.js.map +1 -0
  53. package/dist/src/native-store-authority.d.ts +29 -0
  54. package/dist/src/native-store-authority.js +181 -0
  55. package/dist/src/native-store-authority.js.map +1 -0
  56. package/dist/src/semantic-tool-descriptions.js +22 -16
  57. package/dist/src/semantic-tool-descriptions.js.map +1 -1
  58. package/dist/src/semantic-tool-list-budget.js +2 -1
  59. package/dist/src/semantic-tool-list-budget.js.map +1 -1
  60. package/dist/src/semantic-tool-list-projection.d.ts +2 -2
  61. package/dist/src/semantic-tool-list-projection.js +23 -11
  62. package/dist/src/semantic-tool-list-projection.js.map +1 -1
  63. package/dist/src/semantic-tool-private-authority.d.ts +5 -0
  64. package/dist/src/semantic-tool-private-authority.js +68 -4
  65. package/dist/src/semantic-tool-private-authority.js.map +1 -1
  66. package/dist/src/semantic-tool-relay.d.ts +1 -0
  67. package/dist/src/semantic-tool-relay.js +12 -5
  68. package/dist/src/semantic-tool-relay.js.map +1 -1
  69. package/dist/src/semantic-tool-runtime.js +5 -37
  70. package/dist/src/semantic-tool-runtime.js.map +1 -1
  71. package/dist/src/semantic-tool-schemas.d.ts +25 -0
  72. package/dist/src/semantic-tool-schemas.js +26 -10
  73. package/dist/src/semantic-tool-schemas.js.map +1 -1
  74. package/dist/src/session-store.js +5 -1
  75. package/dist/src/session-store.js.map +1 -1
  76. package/dist/src/store-owner-identity.d.ts +24 -0
  77. package/dist/src/store-owner-identity.js +127 -0
  78. package/dist/src/store-owner-identity.js.map +1 -0
  79. package/dist/src/store-owner-process.d.ts +24 -0
  80. package/dist/src/store-owner-process.js +104 -0
  81. package/dist/src/store-owner-process.js.map +1 -0
  82. package/dist/src/store-owner-registry.d.ts +13 -0
  83. package/dist/src/store-owner-registry.js +158 -0
  84. package/dist/src/store-owner-registry.js.map +1 -0
  85. package/dist/src/store.d.ts +3 -1
  86. package/dist/src/store.js +5 -2
  87. package/dist/src/store.js.map +1 -1
  88. package/dist/src/terminal-action-contracts.js +45 -16
  89. package/dist/src/terminal-action-contracts.js.map +1 -1
  90. package/dist/src/terminal-action-projection.d.ts +1 -1
  91. package/dist/src/terminal-action-projection.js.map +1 -1
  92. package/dist/src/terminal-agent-bridge.js +8 -11
  93. package/dist/src/terminal-agent-bridge.js.map +1 -1
  94. package/dist/src/terminal-composer-classifier.d.ts +1 -0
  95. package/dist/src/terminal-composer-classifier.js +7 -32
  96. package/dist/src/terminal-composer-classifier.js.map +1 -1
  97. package/dist/src/terminal-dispatch-execution.d.ts +4 -1
  98. package/dist/src/terminal-dispatch-execution.js +3 -2
  99. package/dist/src/terminal-dispatch-execution.js.map +1 -1
  100. package/dist/src/terminal-dispatch-ledger-codec.js +1 -1
  101. package/dist/src/terminal-dispatch-ledger-codec.js.map +1 -1
  102. package/dist/src/terminal-dispatch-recovery-cli-adapter.js +2 -21
  103. package/dist/src/terminal-dispatch-recovery-cli-adapter.js.map +1 -1
  104. package/dist/src/terminal-dispatch-repository-cli-adapter.d.ts +3 -1
  105. package/dist/src/terminal-dispatch-repository-cli-adapter.js +3 -2
  106. package/dist/src/terminal-dispatch-repository-cli-adapter.js.map +1 -1
  107. package/dist/src/terminal-human-explicit-send-cli-adapter.js +3 -0
  108. package/dist/src/terminal-human-explicit-send-cli-adapter.js.map +1 -1
  109. package/dist/src/terminal-list-cli-adapter.d.ts +6 -0
  110. package/dist/src/terminal-list-cli-adapter.js +42 -22
  111. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  112. package/dist/src/terminal-list-facts.d.ts +5 -0
  113. package/dist/src/terminal-list-facts.js.map +1 -1
  114. package/dist/src/terminal-list-inventory.d.ts +1 -0
  115. package/dist/src/terminal-list-inventory.js +1 -0
  116. package/dist/src/terminal-list-inventory.js.map +1 -1
  117. package/dist/src/terminal-list-native-identity-recheck.d.ts +35 -0
  118. package/dist/src/terminal-list-native-identity-recheck.js +76 -0
  119. package/dist/src/terminal-list-native-identity-recheck.js.map +1 -0
  120. package/dist/src/terminal-list-ownership-service.d.ts +1 -0
  121. package/dist/src/terminal-list-ownership-service.js +21 -0
  122. package/dist/src/terminal-list-ownership-service.js.map +1 -1
  123. package/dist/src/terminal-list-projection-service.js +2 -1
  124. package/dist/src/terminal-list-projection-service.js.map +1 -1
  125. package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
  126. package/dist/src/terminal-mutation-cli-runtime.d.ts +7 -2
  127. package/dist/src/terminal-mutation-cli-runtime.js +11 -3
  128. package/dist/src/terminal-mutation-cli-runtime.js.map +1 -1
  129. package/dist/src/terminal-permission-control-cli-adapter.js +7 -0
  130. package/dist/src/terminal-permission-control-cli-adapter.js.map +1 -1
  131. package/dist/src/terminal-runtime-cli-adapter.d.ts +1 -0
  132. package/dist/src/terminal-runtime-cli-adapter.js +4 -1
  133. package/dist/src/terminal-runtime-cli-adapter.js.map +1 -1
  134. package/dist/src/terminal-status-cli-adapter.js +1 -0
  135. package/dist/src/terminal-status-cli-adapter.js.map +1 -1
  136. package/dist/src/terminal-status-facts.d.ts +1 -0
  137. package/dist/src/terminal-status-facts.js +8 -1
  138. package/dist/src/terminal-status-facts.js.map +1 -1
  139. package/dist/src/terminal-user-explicit-send-clear.d.ts +6 -12
  140. package/dist/src/terminal-user-explicit-send-clear.js +43 -64
  141. package/dist/src/terminal-user-explicit-send-clear.js.map +1 -1
  142. package/dist/src/terminal-user-explicit-send-policy.js +1 -0
  143. package/dist/src/terminal-user-explicit-send-policy.js.map +1 -1
  144. package/dist/src/terminal-watch-cli-adapter.js +3 -2
  145. package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
  146. package/dist/src/terminal-watch-response-cli-adapter.js +9 -0
  147. package/dist/src/terminal-watch-response-cli-adapter.js.map +1 -1
  148. package/docs/bidirectional-agent-protocol.md +2 -2
  149. package/docs/callback-compatibility.md +2 -1
  150. package/docs/claude-2.1.285-compatibility.md +72 -10
  151. package/docs/claude-cli-direct.md +69 -1
  152. package/docs/list-output.md +97 -1
  153. package/docs/operator-guide.md +136 -9
  154. package/docs/quickstart-herdr.md +1 -1
  155. package/docs/quickstart-tmux.md +5 -3
  156. package/docs/storage-and-logging.md +10 -5
  157. package/docs/testing.md +5 -6
  158. package/package.json +1 -1
  159. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +24 -9
@@ -38,7 +38,7 @@ compatibility; it can be `unknown` while the screen is visibly idle because
38
38
  native identity or durable activity is ambiguous. These axes are diagnostic
39
39
  and never replace a current `available_actions` entry as mutation authority.
40
40
 
41
- Human-friendly selectors such as `only`, `codex`, `claude`, and `@short-ref` remain slash-command discovery inputs. The v31 structured model contract carries semantic IDs only and does not expose selectors or opaque authority values. Its core shapes are `send({session_id|terminal_id,request})` with mutually exclusive targets, `watch({terminal_id})`, `model_options({terminal_id})`, the separately advertised Codex-only `repair_model_control({terminal_id})`, followed by `set_model({terminal_id,model,reasoning_effort})`, `native_inspect({terminal_id,inspection})`, `identify_foreground({terminal_id})`, `identify_and_send({terminal_id,request})`, `new_thread({terminal_id})`, `resume_thread({terminal_id,native_thread_id})`, `respond_interaction({turn_id|watch_id,interaction_id,answers,delivery_mode?})` with exactly one subject target and `delivery_mode` present only for an `async_question`, managed `approve({turn_id,decision})` or approve-once-only terminal-scoped `approve({terminal_id})`, and `reconcile_binding({terminal_id,conflicting_session_id})`. Model selection, model-control residue repair, approval, native interaction response, handoff takeover, and reconciliation require explicit user intent and fresh source state. The trusted plugin/CLI privately derives and revalidates terminal, catalog, binding, candidate, prompt, interaction, composer, handoff, revision, and compare-and-swap fences; the model never transports them. Store format remains 1 and writer protocol is 8; Terminal Watch schema is 3.
41
+ Human-friendly selectors such as `only`, `codex`, `claude`, and `@short-ref` remain slash-command discovery inputs. The v31 structured model contract carries semantic IDs only and does not expose selectors or opaque authority values. Its core shapes are `send({session_id|terminal_id,request})` with mutually exclusive targets, `watch({terminal_id})`, `model_options({terminal_id})`, the separately advertised Codex-only `repair_model_control({terminal_id})`, followed by `set_model({terminal_id,model,reasoning_effort})`, `native_inspect({terminal_id,inspection})`, `identify_foreground({terminal_id})`, `identify_and_send({terminal_id,request})`, `new_thread({terminal_id})`, `resume_thread({terminal_id,native_thread_id})`, `respond_interaction({turn_id|watch_id,interaction_id,answers,delivery_mode?})` with exactly one subject target and `delivery_mode` present only for an `async_question`, managed `approve({turn_id,decision})` or approve-once-only terminal-scoped `approve({terminal_id})`, and `reconcile_binding({terminal_id,conflicting_session_id})`. The separately advertised `transfer_store_authority` action uses that same tool with `{operation:"transfer_store_authority",terminal_id,maintenance_acknowledgement?:true}`; legacy maintenance acknowledgement requires the user to stop all source-Store Hosts and old writers first. See [terminal recovery](operator-guide.md#terminal-recovery-and-diagnostics). Model selection, model-control residue repair, approval, native interaction response, handoff takeover, and reconciliation require explicit user intent and fresh source state. The trusted plugin/CLI privately derives and revalidates terminal, catalog, binding, candidate, prompt, interaction, composer, handoff, revision, and compare-and-swap fences; the model never transports them. Store format remains 1 and writer protocol is 11; Terminal Watch schema is 3. Protocol 11 fences retired source Session authority after Store transfer against predecessor writers.
42
42
 
43
43
  ## Managed Turn Flow
44
44
 
@@ -55,7 +55,7 @@ and session-only/new/resume and first-modal limits are described in the
55
55
  5. AKK sends a structured callback containing both `session_id` and `turn_id` to the originating Host session when it has reliable approval, completion, cancellation, stall, or failure evidence.
56
56
  6. After completion, refresh the terminal list. Another ordinary send through that row's current exact action creates a new Turn without clearing the native coding-agent context.
57
57
 
58
- Steps 2–6 describe managed delivery, which may require an exact empty Composer before input. For an advertised `terminal_user_explicit` Send, the selected live terminal/process and direct input-safety checks authorize the one physical Send; rollout, Session, Store, and callback state are sidecar management evidence rather than vetoes. Parsed working activity, an existing draft, and ordinary main-Composer visibility do not veto this user-priority path, but a blocked native approval or a proven input-owning questionnaire, editor, menu, or read-only viewer remains a zero-input boundary. Profiled Codex 0.154.0/0.155.1 exact collapsed async-question summaries remain sendable because the main Composer owns input; their expanded, clipped, or ambiguous async editors do not. Codex clears the current Composer once with `C-u`; Claude Code uses a sentinel-backed native `C-s` stash-clear transaction that is independent of the cursor position and does not interrupt an active turn, then proves the main Composer empty. Each then injects the request, waits through the paste window, and dispatches Enter exactly once. Codex also freezes the complete pre-send open-rollout inventory and scans those candidates together with newly opened roots after submission. One rollout that uniquely accepts the exact request hash is promoted to the managed Session/Turn; zero matches remain pending/unproven, while multiple matches or changed file/process authority become uncertain without replay. After either agent's text injection, no Composer observation may veto Enter.
58
+ Steps 2–6 describe managed delivery, which may require an exact empty Composer before input. For an advertised `terminal_user_explicit` Send, the selected live terminal/process and direct input-safety checks authorize the one physical Send; rollout, Session, Store, and callback state are sidecar management evidence rather than vetoes. For Codex, parsed working activity, an existing draft, and ordinary main-Composer visibility do not veto this user-priority path, but a blocked native approval or a proven input-owning questionnaire, editor, menu, or read-only viewer remains a zero-input boundary. Profiled Codex 0.154.0/0.155.1 exact collapsed async-question summaries remain sendable because the main Composer owns input; their expanded, clipped, or ambiguous async editors do not. Claude instead requires an empty recognized main Composer, no existing stashed draft, a known footer and no running or unproven foreground turn. Cross-Store authority conflicts remain fenced. Codex clears the current Composer once with `C-u`; Claude Code refuses an existing stashed draft before input. On a freshly empty main Composer it uses one `C-s` to check for a hidden stash; restored content stops task submission and remains for the user. It writes no sentinel and deletes no draft. Each then injects the request, waits through the paste window, and dispatches Enter exactly once. Codex also freezes the complete pre-send open-rollout inventory and scans those candidates together with newly opened roots after submission. One rollout that uniquely accepts the exact request hash is promoted to the managed Session/Turn; zero matches remain pending/unproven, while multiple matches or changed file/process authority become uncertain without replay. After either agent's text injection, no Composer observation may veto Enter.
59
59
 
60
60
  If managed preparation still fails before input, physical-terminal authority performs the same single Send and best-effort persists an exact request-bound Terminal Watch. That Watch supplies completion callbacks. Before exact native acceptance it remains notify-only; after acceptance it can emit an idempotent `interaction_required` wake-up and, through same-controller Status, expose one supported native-interaction response offer. Activity/best-effort or manual-only observations emit `interaction_manual_required` and require direct TUI input. Watch attachment failure is reported without changing or retrying the successful Send. Send output treats transport, native acceptance, management, and observation as separate facts through `terminal_input_dispatched`, `agent_acceptance`, `management_mode`, `observation_mode`, and `capabilities`; legacy delivery fields remain compatibility aliases. Once clear or request input may have occurred, an uncertain result must never be retried automatically.
61
61
 
@@ -42,7 +42,8 @@ they are not converted into a permissive activity fallback.
42
42
  Ordinary List/Status remains observation-only and does not create either Watch.
43
43
  Existing managed tasks and user terminals are not restarted by this policy.
44
44
 
45
- The store writer protocol is 10. Outer Terminal Watch schema remains 3; new
45
+ The store writer protocol is 11. It additionally protects retired Session
46
+ authority after Store transfer from predecessor writers. Outer Terminal Watch schema remains 3; new
46
47
  paginated anchors and request-correlated activity anchors use version 2. Earlier
47
48
  anchors remain readable. The store upgrade changes the writer fence without
48
49
  rewriting existing private Watch records, and older writers cannot mutate the
@@ -116,18 +116,80 @@ approval/callback lifecycle, and real external notification delivery are not
116
116
  covered by this observation. Existing fast regressions remain distinct from native evidence. Unrecognized interaction shapes
117
117
  retain manual handling rather than gaining authority through version matching.
118
118
 
119
- A pre-existing explicit-Send issue was also observed: Claude automatically
120
- restores its `C-s` stash on request submission, including AKK's draft-replacement
121
- sentinel. This can leave ` [AKK replacing current draft]` in the Composer after
122
- successful Send and callback. It can block subsequent operations that require an
123
- empty Composer until the user clears the draft. The same native behavior exists
124
- in 2.1.266 and 2.1.282. This change does not redesign that clearing transaction or
125
- attempt asynchronous cleanup, which could erase newly entered user text. The
126
- lifecycle observations above start with an empty Composer after explicitly
127
- clearing only the owned probe's sentinel; they do not prove automatic recovery
128
- from this residue.
119
+ A pre-existing explicit-Send issue was also observed in this compatibility run:
120
+ Claude automatically restored its `C-s` stash on request submission, including
121
+ AKK's draft-replacement sentinel. This left ` [AKK replacing current draft]` in
122
+ the Composer after successful Send and callback and could block subsequent
123
+ operations that require an empty Composer. The same native behavior exists in
124
+ 2.1.266 and 2.1.282. The original compatibility change did not redesign that
125
+ clearing transaction. The lifecycle observations above start with an empty
126
+ Composer after explicitly clearing only the owned probe's sentinel; they do not
127
+ prove automatic recovery from this residue.
128
+
129
+ AKK 0.16.1 replaces the former marker/stash/erase transaction with existing-stash
130
+ refusal and one non-destructive restore probe, described below. The abandoned
131
+ local preview that attempted to consume and delete its own sentinel is not the
132
+ released implementation. Ordinary managed Sends, Codex and independent Watch
133
+ monitoring retain their existing behavior.
129
134
 
130
135
  Full, integration, and release suites were excluded from the initial local
131
136
  task under `AGENTS.md`. After the user successfully tested the installed
132
137
  combined candidate and authorized publication, the standard release gate was
133
138
  run separately; see the Codex 0.159.2 report.
139
+
140
+ ### Claude 2.1.295 physical footer compatibility
141
+
142
+ The native footer can show shell counts, `esc to interrupt`, `↓ to manage`,
143
+ and a right-aligned `Debug` label after `← for agents`. Physical Send accepts
144
+ only recognized native components, including wrapped rows and a separate
145
+ right-aligned stash indicator; unknown footer text still blocks before input.
146
+ A stash indicator is recognized as native footer syntax but blocks physical Send before input. `Draft restored` is a separate transient notification; an accompanying `› stashed` still reports a populated slot. The label is not proof of what the stash contains.
147
+
148
+ A shell count does not establish that Claude's foreground turn is idle.
149
+ Physical Send checks the foreground evidence independently and rejects a
150
+ running or unproven foreground turn. It also preserves an existing user draft:
151
+ the user must send, save, or clear it before a new physical Send. A completed
152
+ foreground turn with background shells and an empty recognized Composer can
153
+ remain eligible. These checks apply before task text; there is no Composer
154
+ observation, cleanup, or delivery veto after Enter.
155
+
156
+
157
+ ### Existing-stash refusal in AKK 0.16.1
158
+
159
+ Claude physical-input preparation finishes before task text or Enter. A visible `› stashed` indicator refuses the attempt before any terminal input. When no stash is shown, AKK rechecks the empty main Composer and uses `C-s` once to restore any hidden stash. If content appears, it stops and leaves that content in the input box for the user; it does not re-stash or delete it. If the probe or final empty check is uncertain, it stops without task text or Enter and does not retry the key. This replaces the former sentinel transaction: no new marker is written and no editing keys delete a draft. There is no Composer observation or cleanup after task text or Enter. Ordinary managed Sends, Codex clearing and independent Watch monitoring are unchanged. This is refusal with manual recovery, not a guarantee of protecting drafts against simultaneous human input; avoid typing in the pane during an attempt. Screen capture and key delivery are not an atomic keyboard lock. A transport acknowledgement cannot prove that Claude processed `Ctrl+S`; ignored keys or cropped native indicators can leave stash occupancy unproven. AKK does not overwrite that unknown slot with a marker.
160
+
161
+ If List or Send reports a stashed draft, open that exact window and wait for the foreground turn to finish. Preserve any visible draft first. With the main input box empty, press `Ctrl+S` once to restore the stash, then save, send, or clear it yourself before refreshing List. AKK cannot identify hidden content just from the stash label. If restoration reveals `[AKK replacing current draft ...]`, it may be residue from an older failed AKK cleanup: remove only that marker after checking the text, preserve any other content, and do not press Enter on the marker. `Draft restored` is a transient restore notification; an accompanying `› stashed` still reports an occupied slot and remains a refusal condition. Do not repeatedly toggle `Ctrl+S` or retry an uncertain AKK attempt automatically.
162
+
163
+
164
+ ### Shared notification-row correction in AKK 0.16.1
165
+
166
+ The earlier local preview validation covered separate stash-badge rows, but a later native
167
+ 2.1.295 observation showed the badge appended to another notification immediately
168
+ above the Composer:
169
+
170
+ ```text
171
+ new task? /clear to save 337.6k tokens · › stashed
172
+ ────────────────────────────────────────────────
173
+ ❯
174
+ ────────────────────────────────────────────────
175
+ ⏵⏵ bypass permissions on (shift+tab to cycle) · ← for agents
176
+ ```
177
+
178
+ The earlier whole-line badge matcher missed that occupied stash. Its passing fast
179
+ suite and prior live checks were insufficient for this real layout. AKK
180
+ 0.16.1 matches the badge at the end of the nearest notification row above
181
+ the current Composer, or at the end of a trailing row, rather than requiring
182
+ that the badge occupy the whole row. `Draft restored · new task? /clear to save
183
+ 337.6k tokens · › stashed` also refuses before input. The `/clear` hint without a
184
+ badge does not itself block Send; foreground, input-ownership and closed-footer
185
+ checks remain independent. Earlier history rows are not treated as current
186
+ stash evidence when a newer reply intervenes.
187
+
188
+ Action contract 35 and projection v4 remain unchanged: this is an implementation
189
+ fix for the already documented no-stash precondition. It does not remove the
190
+ concurrent-input or native-key acknowledgement limits described above. The native stash-and-restore sequence was verified on the office Claude 2.1.295 /
191
+ Herdr test setup and independently repeated by the user; transformed-screen
192
+ and zero-input Bridge cases are regression evidence, not additional live
193
+ sessions. See [PR #464](https://github.com/scotthuang/agent-knock-knock/pull/464).
194
+ The publishing machine runs the separate release gate; it does not repeat
195
+ those live actions in existing user sessions.
@@ -4,6 +4,8 @@ AKK controls an already-open Claude Code CLI through its native connection or an
4
4
 
5
5
  Starting with AKK **0.15.0**, new Claude Code sends automatically prefer a **managed terminal Turn** when AKK verifies a unique controllable tmux/Herdr counterpart for the exact native session and process. The result supplies a `turn_id` for monitoring and supported approvals or question responses; the caller does not select a transport or enable background management. Without that exact terminal, AKK uses the native inbox and returns a `claude-cli-watch:...` receipt. Codex CLI continues to prefer its shared backend. Existing Turns, Watches and send receipts retain their original provider and are never migrated or resent to adopt this policy.
6
6
 
7
+ An explicitly selected physical terminal is a separate existing operation. When List offers that terminal's `terminal_user_explicit` Send, call Send with its exact displayed `terminal_id` and request. AKK may enter text and submit Enter even when native conversation identity is unresolved, subject to the current terminal input-safety checks: an empty recognized main Composer, a known native footer, and no running or unproven foreground turn. Background shells alone do not block this physical Send. This does not prove native acceptance or completion and does not add background-worker protocol support. Ordinary managed sends never silently downgrade to physical input after failure, and callers do not pass a new scope or private token.
8
+
7
9
  Live observations include **Claude Code `2.1.295` and `2.1.296` on macOS**, using native peer protocol `1`. These are tested versions, not minimum versions or a promise that every UI variant works. An unlisted, complete `x.y.z` version can use the compatible runtime contracts; absence from the regression matrix alone does not disable an otherwise eligible operation. Discovery checks the running CLI's registry, native session UUID, PID/start time, and socket identity. Unknown identity, protocol or UI structure is not guessed.
8
10
 
9
11
  AKK uses a small **Python 3 helper on the controller side** to verify macOS Unix-socket peer credentials. Python 3 must be available to AKK. This is not installed into Claude Code and does not change its login, proxy, permissions, or settings. Other operating systems do not yet have this direct adapter; existing supported terminal routes remain available.
@@ -37,10 +39,64 @@ Keep the authenticated Claude Code CLI open and ask your controller to refresh `
37
39
 
38
40
  > Use AKK to ask Claude Code in my-project to inspect the failing tests. Tell me when it finishes.
39
41
 
40
- Save the task identity returned by Send: `turn_id` for managed terminal delivery, or `watch_id` for native inbox delivery. Monitoring starts automatically; do not add another Watch for that task. Use Status with that exact task identity for follow-up, including managed approvals. Conversation Status reads the latest input and must not replace the original task identity. For a task started manually in the CLI, explicitly ask the controller to Watch it.
42
+ For managed or native inbox delivery, save the task identity returned by Send: `turn_id` for managed terminal delivery, or `watch_id` for native inbox delivery. Monitoring starts automatically; do not add another Watch for that task. Use Status with that exact task identity for follow-up, including managed approvals. An explicitly selected physical Send reports its actual dispatch and observation evidence; without native identity, it cannot promise acceptance or completion monitoring. Conversation Status reads the latest input and must not replace the original task identity. For a task started manually in the CLI, explicitly ask the controller to Watch it.
41
43
 
42
44
  The usual `CLAUDE_CONFIG_DIR` is respected. For native inbox delivery, AKK does not modify Claude's inbound-message policy: if the session holds or refuses peer messages, the result remains held/refused rather than being bypassed with terminal input. Native busy Send is rejected because Claude can absorb an inbound message into the task already running.
43
45
 
46
+ ### When List offers different operations
47
+
48
+ List's per-conversation guidance explains the current usable operations and
49
+ recovery steps. An idle native conversation can accept Send without offering
50
+ Watch because there is no active task to observe. Send creates monitoring for
51
+ its own task. A working or waiting native conversation can offer Watch, whose
52
+ creation still requires an exact active input. Terminal activity observation is
53
+ a different, best-effort operation and may remain available on an unidentified
54
+ terminal.
55
+
56
+ If a Claude pane lacks verified identity, List requests one additional fresh
57
+ snapshot from the configured reader, shared across unresolved Claude panes in
58
+ that scan. It applies the same interactive-session and exact process, registry
59
+ and configuration-home checks. It never types into the terminal, promotes a
60
+ background agent, or substitutes a same-directory conversation. If the retry
61
+ cannot establish native identity, the row explains the missing proof and the
62
+ operations still offered, even when a more specific diagnostic is unavailable.
63
+ An independently offered physical Send may still accept terminal input. Follow the
64
+ actual action and its stated proof limits rather than interpreting missing
65
+ native identity as a blanket input prohibition.
66
+
67
+ The live investigation initially looked like a reader omission. The installed
68
+ Claude Code 2.1.295 runtime instead deliberately excludes a foreground registry
69
+ record carrying `parkedJobId` from `agents --json`; `--all` only adds completed
70
+ background jobs and does not remove that exclusion. A foreground window in the
71
+ Agents/background-session interface can display a conversation executed by a
72
+ separate `bg-spare` process. Its own registered session is therefore not proof
73
+ of the identity of the displayed conversation. This finding describes the
74
+ inspected installation, not a universal contract for every Claude release.
75
+
76
+ For an unresolved Claude terminal, AKK can explain this state using a bounded,
77
+ read-only check of the foreground process's owned registry, exact PID and live
78
+ process start identity. Positive evidence produces background-view guidance.
79
+ When that physical terminal offers Send, explicitly selecting it can enter text
80
+ and submit Enter; the result must still be checked in the window because native
81
+ acceptance and exact task completion are unproven. When Send is not offered,
82
+ continue manually in the current window, or start an ordinary foreground
83
+ conversation without attaching a background conversation, then refresh List.
84
+ Restarting and reopening the same background conversation does not change its
85
+ execution model. This is a display diagnosis only: AKK does not resolve the
86
+ background job or worker, access daemon or claim sockets, add a background
87
+ protocol delivery route, or promise exact background-task completion. The
88
+ background-view marker neither grants physical Send authority nor blocks an
89
+ otherwise valid physical input action.
90
+
91
+ Missing, unsafe, malformed, stale or unreadable evidence does not become a
92
+ background diagnosis. List retains the generic explanation that the current
93
+ conversation identity could not be confirmed, with the physical input option
94
+ when actually offered, or steps to inspect the pane, continue directly, and
95
+ retry ordinary startup/List refresh where appropriate.
96
+ Restarting remains an attempt, not a guaranteed repair. Background jobs remain
97
+ excluded from AKK's interactive conversation list, so scan counts are not a
98
+ count of every Claude process on the machine.
99
+
44
100
  ### Sender permission class
45
101
 
46
102
  For native inbox delivery, set `AKK_NATIVE_CLAUDE_SENDER_PERMISSION_CLASS` in the **AKK/controller Host's launch environment**, with `bypass` or `prompting`. AKK declares that value in the native `<cross-session-message from-mode="…">` envelope and escapes the supplied task text. Callers pass the plain task request; they do not construct the envelope. Managed terminal sends do not use this envelope. The declaration does not change the target's permissions or bypass its hold/refuse policy.
@@ -68,6 +124,18 @@ Native Send and explicit native Watch share the **720-minute default hard deadli
68
124
 
69
125
  For a native Watch, use an explicit renewal only when the same native input is still active. A completed, failed, interrupted, or exited native task cannot renew. `recover` reconciles saved state; it neither resends the prompt nor extends the deadline. `close` ends AKK's management of a native Send, while `unwatch` stops observation. Neither cancels Claude. Managed terminal tasks retain their existing Turn-specific approval, renewal, cancellation and close actions. Callback retry is restricted to a known retryable delivery failure; accepted or uncertain notifications are not blindly replayed. See [Backend Recovery](backend-task-recovery.md) for the native concepts.
70
126
 
127
+ If the native conversation's exact terminal is owned by another AKK Store, idle
128
+ Claude does not authorize a managed Send or native fallback. Use only its fresh
129
+ `transfer_store_authority` action when offered: the tool is
130
+ `agent_knock_knock_reconcile_binding` with `operation:"transfer_store_authority"`
131
+ and the action's physical `terminal_id`. This explicitly transfers settled Store
132
+ authority without sending Claude input or creating a Turn. Legacy records may
133
+ require the user to stop all source-Store Hosts and old writers and explicitly
134
+ set `maintenance_acknowledgement:true`; the agent cannot infer that condition.
135
+ Afterward refresh List and keep the original native `conversation_id` for Send.
136
+ Ordinary binding reconciliation only detaches a local Session and cannot replace
137
+ this transfer. See [terminal recovery](operator-guide.md#terminal-recovery-and-diagnostics).
138
+
71
139
  AKK persists the exact acceptance anchor, monitor deadline and callback outbox. It polls the native records instead of relying on Claude's session-level idle notification, whose subscriptions can replace one another and which does not identify an independently completed task.
72
140
 
73
141
  ## Protocol and verification boundary
@@ -11,6 +11,100 @@ Use `agent_knock_knock_watches`, `/akk watches` or CLI `watches` to inspect
11
11
  monitoring. This is a read-only Store query: it does not create or renew a Watch,
12
12
  reconcile callbacks, reconnect a native session or send notifications.
13
13
 
14
+ ## Understanding a conversation row
15
+
16
+ Each conversation includes `usage`, a bounded explanation derived from its
17
+ current offered actions, activity, capabilities and blockers:
18
+
19
+ | Field | Meaning |
20
+ | --- | --- |
21
+ | `summary` | Whether the conversation can receive work or currently needs attention |
22
+ | `available` | What the user can do now |
23
+ | `limitations` | Why a relevant operation is unavailable, including uncertainty |
24
+ | `next_steps` | Concrete actions the user or controller can take next |
25
+
26
+ Controllers should present this guidance in the user's language, beside the
27
+ conversation title and project. A list of missing switches or internal reason
28
+ codes is not a substitute for explaining what to do. Guidance is regenerated
29
+ from each observation; it does not grant authority, add an action, or change
30
+ existing action eligibility. The current `available_actions` and their input
31
+ contracts remain authoritative. `usage` is an additive field within Host List
32
+ projection v4. Action contract v35 adds a no-existing-stash prerequisite to Claude physical Send. This narrows eligibility for an empty input box with a stashed draft, so the action contract increases from v34; it is not only a wording change. The per-agent Composer policy names and public Send parameters remain unchanged. Readiness diagnostics are additive, and compact projection remains v4.
33
+ The shared List projection adds this guidance to Codex CLI, Codex Desktop,
34
+ Claude and terminal-only rows. Existing identities, capabilities and action
35
+ offers retain their meanings; consumers may ignore the new display field.
36
+ The additional identity recheck and background-view diagnosis described below
37
+ apply only to Claude terminals, not to Codex discovery or dispatch.
38
+
39
+ Different rows can legitimately offer different next steps. An idle native
40
+ Claude conversation may accept Send without offering Watch: there is no active
41
+ task to attach that Watch to. Send starts monitoring for its new task, so keep
42
+ the returned Turn or Watch identity. A working native conversation can offer
43
+ Watch, with the exact active input revalidated when observation starts. A
44
+ terminal-only Watch can observe terminal activity; it does not establish an
45
+ exact native task or prove that task succeeded.
46
+
47
+ For an unresolved Claude terminal identity, List makes one additional fresh
48
+ reader check, shared across the unresolved Claude terminals in that scan. It
49
+ does not send terminal input or trust a registry file alone. If native identity
50
+ remains unproven, List retains that uncertainty and explains the currently
51
+ offered operations. A separately verified physical terminal Send can remain
52
+ available; a failed native identity check does not establish native acceptance
53
+ or completion, and does not by itself prove that terminal input is unsafe.
54
+
55
+ A Claude window can display a background conversation while its own foreground
56
+ conversation is parked. When a read-only check of that foreground process's
57
+ owned registry and current process incarnation verifies this state, guidance
58
+ explains that this window is in the background-session interface. This does not
59
+ make the window read-only. When its real `terminal_user_explicit` Send action
60
+ is offered, explicitly selecting that physical terminal lets AKK enter the
61
+ requested text and submit Enter. The guidance distinguishes input dispatch
62
+ from unproven native acceptance and completion, and asks the user to inspect
63
+ the execution result in the window. Without that physical action, the user can
64
+ continue manually or start an ordinary foreground conversation and refresh
65
+ List. Reopening the same background conversation does not make it an ordinary
66
+ foreground conversation.
67
+ The raw observation adds
68
+ `native_agent_identity_observation.window_role: "background_view"` only for
69
+ that positive diagnosis; compact Host output carries its explanation in `usage`.
70
+ This diagnosis does not identify or bind the background worker, inspect daemon
71
+ or claim sockets, or grant physical Send authority or exact-task monitoring.
72
+ Physical authority comes only from the current terminal action and its input
73
+ safety checks, not from the background-view marker.
74
+
75
+ If the registry check is missing, malformed, unsafe, stale or unavailable, List
76
+ does not infer a background session. It retains the generic explanation that
77
+ the native conversation identity could not be confirmed, together with the
78
+ actual physical Send option when offered, or instructions to inspect the pane,
79
+ use it manually, and retry ordinary startup and List refresh if appropriate.
80
+ Failure to diagnose never removes the guidance.
81
+ Relaunching is a recovery attempt, not a guaranteed repair.
82
+
83
+ Claude physical rows additionally expose `physical_send_readiness` from the
84
+ same current screen evidence used before input. An unsent user draft blocks
85
+ Send and tells the user to send, save or clear it manually. A running foreground
86
+ turn blocks Send until completion; an unproven running state asks the user to
87
+ wait and refresh. Background shells alone do not block Send when the main
88
+ Composer is empty and foreground completion can be verified. Unknown footer
89
+ controls or an unrecognized input box stop automatic input and explain what
90
+ AKK could not verify. These explanations take precedence over native-identity
91
+ uncertainty. Codex readiness and managed Send rules are unchanged.
92
+
93
+ To use an offered physical Send, select its displayed `terminal_id` and the
94
+ existing Send tool's semantic inputs. No new public scope or token parameter
95
+ is required. An ordinary managed Send does not silently switch to this route
96
+ after an identity, ownership, Store or submission failure; uncertain input must
97
+ never be replayed through a second route. A physical dispatch receipt proves
98
+ only the stages it reports. Terminal activity observation is not native task
99
+ acceptance or completion proof.
100
+
101
+ `managed.session_count` counts distinct related Sessions found through current
102
+ or historical managed records. It does not count valid current bindings. A
103
+ positive count with null `session_id` and `session_short_ref`, and no
104
+ `binding_status`, means no current authoritative Session was selected; it is not
105
+ evidence that List lost a binding. These historical associations do not authorize
106
+ Send or ownership recovery.
107
+
14
108
  ## Conversation selection
15
109
 
16
110
  Since 0.14.12 the default view prefers a verified backend as the project's CLI
@@ -63,7 +157,9 @@ Each Host page is capped at 24 KiB of UTF-8 JSON and 12,000 weighted characters
63
157
  (ASCII 1, other code points 16), including metadata. This is not a token budget.
64
158
  Oversized rows retain exact IDs and a Status entry point; omitted actions do not
65
159
  mean unsupported capabilities. Read exact Status for current questions, approvals
66
- and bounded public progress. List contains no progress body.
160
+ and bounded public progress. Their guidance explains that details were omitted
161
+ and directs the user to Status instead of claiming those operations are
162
+ unsupported. List contains no progress body.
67
163
 
68
164
  Desktop catalog pagination remains separate: finish Host pages for one catalog
69
165
  page, then pass `desktop_scan.next_cursor` as `desktopCursor` with the same filters
@@ -36,6 +36,67 @@ fields in List does not mean Send had no monitoring. See
36
36
  [List and Watch inventory](list-output.md) for the 24-hour query window,
37
37
  48-hour eligible-history retention and separate Desktop catalog cursor.
38
38
 
39
+ ## What can I do with this conversation?
40
+
41
+ Read the guidance beside each conversation. It explains what works now, what
42
+ is preventing other operations, and the next step. The controller should give
43
+ this explanation in your language instead of asking you to interpret internal
44
+ error codes. It changes when the conversation's state changes.
45
+
46
+ | What List shows | What to do |
47
+ | --- | --- |
48
+ | Can send and watch | Send a new task when offered, or ask AKK to watch the task already running. |
49
+ | Can send, but no active task to watch | Send your task. Monitoring starts with that Send; keep its returned task reference. An idle conversation is usable. |
50
+ | Can send to a window whose native conversation is unverified | Select that exact terminal's offered Send. AKK can enter text and submit Enter, but you must inspect the result in the window because native acceptance and completion are unproven. |
51
+ | Window is in the background-session interface | Use its physical Send if offered and inspect the result there. If Send is unavailable, continue manually or open an ordinary foreground Claude conversation and refresh List. |
52
+ | Can only inspect or watch the terminal and cannot identify the Claude conversation | AKK has retried identification without typing into the terminal. Use the original terminal to finish or safely stop any work, then follow the recovery steps below. |
53
+ | Needs approval or management recovery | Open Status for that exact conversation or task and follow its currently offered response or recovery action. |
54
+ | Details omitted from this List page | Open Status for that row. Missing details do not mean the conversation lacks those features. |
55
+
56
+ For a sendable background window, the instruction means:
57
+
58
+ > 可以向此窗口发送任务。AKK 会输入文字并提交,但目前无法可靠确认后台任务的接受和完成状态;请在窗口中查看执行结果。
59
+
60
+ Choose the exact terminal entry and its offered Send action. This is ordinary
61
+ terminal input, not a direct background-worker connection, and it does not
62
+ promise a task-completion callback. An existing managed task that failed is not
63
+ automatically retried through this route. If input might already have happened,
64
+ inspect the original result before considering another send.
65
+
66
+ If the window is showing a background conversation and physical Send is not
67
+ offered, you can keep working in the current window manually. An ordinary
68
+ foreground Claude conversation can instead provide native task identity and
69
+ monitoring when those operations are offered. Reopening the same background
70
+ conversation after restarting will not add that proof. Neither option converts
71
+ the existing background conversation or transfers its work. In the inspected
72
+ Claude Code 2.1.295 installation,
73
+ `tclaude attach --help` documents `Ctrl+Z` as returning to the shell while the
74
+ background session keeps running; check the installed command's help before
75
+ applying that shortcut to another runtime or interface.
76
+
77
+ If Claude remains unidentified and List cannot confirm that more specific
78
+ background-view explanation:
79
+
80
+ 1. Open the named pane in Herdr or tmux and check what is running there. You can
81
+ continue using Claude directly. If its current physical Send action is
82
+ offered, you can also select that terminal for input while inspecting the
83
+ result manually.
84
+ 2. After finishing or safely stopping any current work, exit Claude with `/exit`
85
+ and relaunch it with your usual command in the same project directory. If
86
+ resuming history opens a background conversation, use the guidance above
87
+ instead of repeatedly restarting.
88
+ 3. Refresh AKK List and select the newly identified conversation. Do not resend a
89
+ task whose earlier delivery is uncertain; inspect its saved task reference.
90
+ 4. If the row still cannot receive work, keep using that terminal directly and
91
+ report the discovery limitation. A missing or failed diagnostic check does
92
+ not prove a background conversation or a reader bug. Relaunching can refresh
93
+ registration, but cannot guarantee a repair.
94
+
95
+ You do not need to restart the controller Host for this recovery attempt. A
96
+ terminal Watch can report terminal activity while identity is unresolved; it
97
+ cannot promise exact task completion. A count of related managed Sessions is
98
+ history, not proof that this newly discovered conversation is currently bound.
99
+
39
100
  ## Command reference
40
101
 
41
102
  Direct slash commands are available in every first-party Host integration:
@@ -168,21 +229,34 @@ The user-priority `terminal_user_explicit` path requires one exact live
168
229
  physical terminal/process, a scanned non-blocked approval state, and no proven
169
230
  input-owning questionnaire, editor, menu, or read-only viewer. Broken AKK Turn,
170
231
  Session, transfer, transition, ledger, or Store state cannot veto the user's
171
- explicit Send. Neither can parsed working activity, an existing draft, or
172
- ordinary Composer visibility, stability, or exactness. Codex physical fallback
173
- sends `C-u` once. Claude Code physical fallback uses a sentinel-backed native
174
- `C-s` stash-clear transaction that is independent of the cursor position and
175
- does not interrupt an active turn, then proves the main Composer empty. Each
232
+ explicit Send within the same Store authority. A conflicting or unfinished
233
+ cross-Store authority transfer still blocks input, including physical fallback.
234
+ For Codex, neither can parsed working activity, an existing draft, or
235
+ ordinary Composer visibility, stability, or exactness. Claude physical Send
236
+ requires an empty recognized main Composer, no existing stashed draft, a known native footer, and no running
237
+ or unproven foreground turn; background shells alone do not block it. Codex physical fallback
238
+ sends `C-u` once. Claude Code refuses an existing stashed draft before input. On a freshly empty main Composer it uses one `C-s` to check for a hidden stash; restored content stops task submission and remains for the user. It writes no sentinel and deletes no draft. Each
176
239
  then injects the new request,
177
240
  waits through the paste window, and dispatches Enter exactly once. After text
178
241
  injection, Composer observation cannot veto Enter. Unreviewed Codex fullscreen
179
242
  frontends additionally require a recognizable styled Composer before clearing
180
243
  and a fresh empty Composer afterward, before any task text is sent.
181
244
 
182
- AKK first takes the managed path where its stronger pre-input requirements
183
- hold. Otherwise it may deliver unmanaged work once and best-effort attaches a
184
- Terminal Watch that provides the completion callback. Exact preparation failure falls back to a request-correlated terminal-activity
185
- Watch when the physical identity and observation path remain valid. Its callback
245
+ Claude physical-input preparation finishes before task text or Enter. A visible `› stashed` indicator refuses the attempt before any terminal input. When no stash is shown, AKK rechecks the empty main Composer and uses `C-s` once to restore any hidden stash. If content appears, it stops and leaves that content in the input box for the user; it does not re-stash or delete it. If the probe or final empty check is uncertain, it stops without task text or Enter and does not retry the key. This replaces the former sentinel transaction: no new marker is written and no editing keys delete a draft. There is no Composer observation or cleanup after task text or Enter. Ordinary managed Sends, Codex clearing and independent Watch monitoring are unchanged. This is refusal with manual recovery, not a guarantee of protecting drafts against simultaneous human input; avoid typing in the pane during an attempt. Screen capture and key delivery are not an atomic keyboard lock. A transport acknowledgement cannot prove that Claude processed `Ctrl+S`; ignored keys or cropped native indicators can leave stash occupancy unproven. AKK does not overwrite that unknown slot with a marker.
246
+
247
+ If List or Send reports a stashed draft, open that exact window and wait for the foreground turn to finish. Preserve any visible draft first. With the main input box empty, press `Ctrl+S` once to restore the stash, then save, send, or clear it yourself before refreshing List. AKK cannot identify hidden content just from the stash label. If restoration reveals `[AKK replacing current draft ...]`, it may be residue from an older failed AKK cleanup: remove only that marker after checking the text, preserve any other content, and do not press Enter on the marker. `Draft restored` is a transient restore notification; an accompanying `› stashed` still reports an occupied slot and remains a refusal condition. Do not repeatedly toggle `Ctrl+S` or retry an uncertain AKK attempt automatically.
248
+
249
+ Within an explicitly selected physical-input operation, AKK can use managed
250
+ delivery where its stronger pre-input requirements hold. Otherwise that
251
+ operation may deliver unmanaged input once and best-effort attach the strongest
252
+ safe Terminal Watch available. A verified exact-task Watch can provide a
253
+ completion callback; that proof is not supplied by a physical dispatch receipt.
254
+ An ordinary Claude managed Send does not change to physical input after failure.
255
+ Read the actual receipt: absent native identity
256
+ means acceptance and completion remain unproven, including for a window showing
257
+ a background conversation. Exact preparation failure may leave a
258
+ request-correlated terminal-activity Watch when the physical identity and
259
+ observation path remain valid. Its callback
186
260
  reports stable idle with best-effort confidence, never exact task success.
187
261
  Watch persistence failure never vetoes, revokes, or retries a successful
188
262
  Send. Uncertain native probe input or unsafe input surfaces stop before task
@@ -329,6 +403,11 @@ stale metadata.
329
403
 
330
404
  Send preserves the selected conversation's existing permission mode. Use an
331
405
  explicit advertised permission action to change it before sending a task.
406
+ Claude Code's `default` mode (`⏸ manual mode on`), plan, accept-edits, and
407
+ bypass modes do not prohibit submitting user task text. Managed Send injects
408
+ the task and dispatches Enter without changing that mode; any subsequent tool
409
+ approval remains a separate interaction. A real approval dialog or changed
410
+ terminal identity still requires the corresponding interaction or recovery.
332
411
  The [CLI backend](codex-cli-native-compatibility.md) and
333
412
  [Desktop](codex-desktop-compatibility.md#settings-and-cancellation) adapters
334
413
  apply and verify the selected conversation's native settings. For a Codex
@@ -341,6 +420,13 @@ operation. Supported managed approvals decide one current request; they do not
341
420
  change the session's permission mode. The native sender's `bypass` or
342
421
  `prompting` declaration is message metadata, not a permission-setting API.
343
422
 
423
+ Host Send uses the dispatch stages' own lock, transport, and acceptance
424
+ timeouts instead of the relay's generic 90-second deadline. Slow discovery
425
+ must not kill the dispatcher between text injection and Enter. Explicit Host
426
+ cancellation and explicitly supplied relay deadlines still apply. If a sender
427
+ is interrupted, inspect its durable submission receipt before deciding what
428
+ to do; an unproven receipt never authorizes an automatic resend or Enter.
429
+
344
430
  ## Safe model control
345
431
 
346
432
  This section describes terminal model control. Desktop settings use the
@@ -559,6 +645,47 @@ state makes them meaningful. `reconcile_binding`, `identify_foreground`, and
559
645
  `repair_model_control` retain their physical-terminal requirements; backend
560
646
  Recover does not replace them.
561
647
 
648
+ An idle coding-agent terminal can still belong to another AKK Store. A resolved
649
+ dispatch means its task settled; it does not release that Store's native-thread
650
+ authority. List reports this conflict and withholds managed Send. An exactly
651
+ associated Claude native conversation can carry its terminal's recovery action;
652
+ use that action's physical `terminal_id`, while retaining the native
653
+ `conversation_id` for the later ordinary Send.
654
+
655
+ The shared runtime stays at its existing configured location; recovery does not
656
+ move the runtime or delete temporary Stores. Automatic recovery is limited to
657
+ Stores explicitly created with `AKK_EPHEMERAL_STORE=1`, under a private, owned,
658
+ non-symlink `akk-*` directory inside the system temporary directory. Every
659
+ registered owner must be proven dead by its exact process incarnation, and the
660
+ native session, physical terminal, idle state, and settled work must still be
661
+ verified. A temporary pathname, elapsed time, or dead PID alone is insufficient.
662
+ Persistent Stores require the advertised explicit transfer. A newer writer
663
+ recording legacy authority preserves its incomplete owner coverage; later writes
664
+ cannot make that legacy authority eligible for automatic recovery.
665
+
666
+ There are two distinct binding-recovery operations:
667
+
668
+ - `agent_knock_knock_reconcile_binding({terminal_id,conflicting_session_id})`
669
+ detaches one advertised stale binding in the current Store. It does not move
670
+ another Store's authority or adopt the live thread.
671
+ - An advertised `transfer_store_authority` action uses
672
+ `agent_knock_knock_reconcile_binding({operation:"transfer_store_authority",terminal_id})`.
673
+ After explicit user confirmation, AKK rechecks the displayed authority and
674
+ transfers eligible settled native-thread authority to this Host's Store.
675
+ No coding-agent input is sent and no Turn is created. Refresh List before
676
+ continuing with the original native conversation's newly advertised Send.
677
+
678
+ For legacy records whose previous Host/writer ownership cannot be proven, the
679
+ action requires `maintenance_acknowledgement`. Stop every Host and old writer
680
+ using the **source Store**, then explicitly confirm that condition and include
681
+ `maintenance_acknowledgement:true`. The controller must never prefill this
682
+ acknowledgement. An idle Claude/Codex prompt, completed task, resolved ledger, or
683
+ elapsed timeout is insufficient evidence that those writers have stopped.
684
+ Any observed live or unverifiable owner, unresolved work, or changed authority
685
+ still prevents transfer. If no transfer action is advertised, use the reported
686
+ owner/conflict diagnostics to resolve the source Host; do not delete a ledger,
687
+ clear Store files, guess a Session ID, or supply a private authority token.
688
+
562
689
  | Command | Use |
563
690
  | --- | --- |
564
691
  | `/akk doctor` | Diagnose installation, Host, terminal, and coding-agent readiness. |
@@ -26,7 +26,7 @@ Wait for the empty idle composer. After the AKK OpenClaw plugin is installed and
26
26
 
27
27
  AKK enumerates every running local Herdr session, identifies a terminal by its session socket plus stable `terminal_id`, and treats the current `pane_id` only as a refreshable route. Moving a live pane does not silently rebind ownership. Every side effect revalidates the terminal resource, shell PID, agent PID, cwd, native-session evidence, and current composer first.
28
28
 
29
- The v31 structured model contract carries semantic IDs only. Ordinary send is `send({session_id,request})` for strict continuation or `send({terminal_id,request})` for the current verified Herdr pane; the targets are mutually exclusive. An advertised `terminal_user_explicit` action keeps the user's Send independent of broken AKK management state and ordinary Composer visibility, stability, exactness, or existing draft contents. It requires the exact live terminal/process, a scanned non-blocked approval state, and no proven questionnaire, editor, menu, history search, or read-only viewer that owns input. The agent-neutral `terminal_user_explicit_composer_policy` advertises `replace_current_composer_and_submit`; the older Codex-named field remains a compatibility alias. Codex freezes the open-rollout candidate set and sends `C-u` once to replace the current Composer; Claude Code uses a sentinel-backed native `C-s` stash-clear transaction that is independent of the cursor position and does not interrupt an active turn, then proves the main Composer empty. Each then injects the request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer veto. For Codex, a unique exact request acceptance promotes the provisional Session/Turn even when `/clear` delayed creation of the foreground rollout; zero or ambiguous matches never cause replay. If managed promotion cannot be prepared before input, AKK still sends once, best-effort attaches an exact Terminal Watch, and releases stale management. After exact request acceptance, that Watch can notify the owning controller of a questionnaire and broker one explicitly chosen response through Status plus `respond_interaction({watch_id,...})`; before acceptance, or when only best-effort activity evidence exists, it remains notification-only. Watch failure never changes delivery. Native inspection and lifecycle input remain exact-empty-only. Send results expose physical dispatch, agent acceptance, management, and observation separately. Watch and native/lifecycle actions likewise expose `terminal_id` (plus `inspection` or `native_thread_id` where applicable), never a pane route, selector, draft text, composer digest, token, fingerprint, revision, or binding generation. AKK resolves the current Herdr route and derives all opaque freshness fences privately, then revalidates them under lock before terminal input. Once clear or request input may have occurred, an uncertain result must not be retried automatically.
29
+ The v31 structured model contract carries semantic IDs only. Ordinary send is `send({session_id,request})` for strict continuation or `send({terminal_id,request})` for the current verified Herdr pane; the targets are mutually exclusive. An advertised `terminal_user_explicit` action keeps the user's Send independent of broken AKK management state within the same Store authority; cross-Store conflicts remain fenced. Codex does not require an empty visible Composer. Claude requires a recognized empty main Composer, no existing stashed draft, a known footer, and no running or unproven foreground turn. It requires the exact live terminal/process, a scanned non-blocked approval state, and no proven questionnaire, editor, menu, history search, or read-only viewer that owns input. Action contract v35 advertises `terminal_user_explicit_composer_policy=per_agent`: Codex uses `replace_current_composer_and_submit`, while Claude uses `require_empty_composer_and_submit` with the additional no-existing-stash rule. The older Codex-named field remains a compatibility alias. Codex freezes the open-rollout candidate set and sends `C-u` once to replace the current Composer; Claude Code refuses an existing stashed draft before input. On a freshly empty main Composer it uses one `C-s` to check for a hidden stash; restored content stops task submission and remains for the user. It writes no sentinel and deletes no draft. Each then injects the request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer veto. For Codex, a unique exact request acceptance promotes the provisional Session/Turn even when `/clear` delayed creation of the foreground rollout; zero or ambiguous matches never cause replay. If managed promotion cannot be prepared before input, AKK still sends once, best-effort attaches an exact Terminal Watch, and releases stale management. After exact request acceptance, that Watch can notify the owning controller of a questionnaire and broker one explicitly chosen response through Status plus `respond_interaction({watch_id,...})`; before acceptance, or when only best-effort activity evidence exists, it remains notification-only. Watch failure never changes delivery. Native inspection and lifecycle input remain exact-empty-only. Send results expose physical dispatch, agent acceptance, management, and observation separately. Watch and native/lifecycle actions likewise expose `terminal_id` (plus `inspection` or `native_thread_id` where applicable), never a pane route, selector, draft text, composer digest, token, fingerprint, revision, or binding generation. AKK resolves the current Herdr route and derives all opaque freshness fences privately, then revalidates them under lock before terminal input. Once clear or request input may have occurred, an uncertain result must not be retried automatically.
30
30
 
31
31
  For a physically exact, exact-empty idle Codex pane with ambiguous rollout identity, a fresh row may advertise `identify_foreground` and `identify_and_send`. The diagnostic action changes no AKK Store record but sends `/status` exactly once through the same visible Herdr pane; its 30-second proof grants no later authority. The atomic action retains the canonical Herdr terminal lock across the probe and one task, while exact request acceptance remains the only durable Session/Turn identity. List and Status never run the probe. Codex 0.158.0/0.159.0/0.159.2 exact Send and active-task Watch use a separate closed `/status` transaction to bind the foreground paginated thread. The three status axes remain independent: `screen_state` describes the live TUI, `native_identity_state` describes foreground identity resolution, and `durable_activity_state` describes exact artifact-backed work; legacy `activity_state` stays conservative for compatibility.
32
32
 
@@ -34,7 +34,7 @@ tmux new-session -s akk-work -c "$(pwd -P)" codex
34
34
 
35
35
  Use `claude` instead of `codex` to share a Claude Code terminal. Wait until the coding agent is authenticated and showing its idle prompt. Detach from tmux with `Ctrl-b`, followed by `d`.
36
36
 
37
- AKK discovers supported Codex and Claude Code panes across workspaces. Before acting, it revalidates the expected agent PID and tmux pane identity, then confirms that the process and pane working directories still match. Managed Send requires a verified idle prompt; an advertised user-explicit physical Send may steer a working Codex or Claude Code pane when its scanned, non-blocked approval boundary remains valid and no proven questionnaire, editor, menu, or read-only viewer owns input. An existing draft or ordinary Composer uncertainty does not veto that explicit Send.
37
+ AKK discovers supported Codex and Claude Code panes across workspaces. Before acting, it revalidates the expected agent PID and tmux pane identity, then confirms that the process and pane working directories still match. Managed Send requires a verified idle prompt; an advertised user-explicit physical Send may steer a working Codex pane when its scanned, non-blocked approval boundary remains valid and no proven questionnaire, editor, menu, or read-only viewer owns input. An existing draft or ordinary Composer uncertainty does not veto Codex explicit Send. Claude physical Send instead requires an empty recognized main Composer, a known native footer, and no running or unproven foreground turn. Background shells alone do not block it.
38
38
 
39
39
  ## 3. Run doctor
40
40
 
@@ -58,7 +58,9 @@ Doctor verifies the installed plugin and skill, Gateway health, tmux, and at lea
58
58
  /akk inspect this repository and summarize it
59
59
  ```
60
60
 
61
- The bare task works when exactly one send-ready coding-agent pane exists across all workspaces. Send-ready means an exact live terminal/process, a scanned non-blocked approval state, and no proven questionnaire, editor, menu, or read-only viewer that owns input. Parsed working activity, an existing draft, and ordinary main-Composer visibility, stability, or exactness do not veto this user-priority path. Profiled Codex 0.154.0/0.155.1 collapsed async-question summaries remain sendable, while their expanded, clipped, or ambiguous editors receive zero AKK input. Codex physical fallback sends `C-u` once to replace the current Composer; Claude Code uses a sentinel-backed native `C-s` stash-clear transaction that is independent of the cursor position and does not interrupt an active turn, then proves the main Composer empty. Each then injects the request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer veto. Broken AKK management state does not veto this user-explicit Send. If more than one pane is eligible, AKK stops instead of guessing: run `/akk list`, then use `/akk <selector>: <message>`, for example:
61
+ Claude physical-input preparation finishes before task text or Enter. A visible `› stashed` indicator refuses the attempt before any terminal input. When no stash is shown, AKK rechecks the empty main Composer and uses `C-s` once to restore any hidden stash. If content appears, it stops and leaves that content in the input box for the user; it does not re-stash or delete it. If the probe or final empty check is uncertain, it stops without task text or Enter and does not retry the key. This replaces the former sentinel transaction: no new marker is written and no editing keys delete a draft. There is no Composer observation or cleanup after task text or Enter. Ordinary managed Sends, Codex clearing and independent Watch monitoring are unchanged. This is refusal with manual recovery, not a guarantee of protecting drafts against simultaneous human input; avoid typing in the pane during an attempt.
62
+
63
+ The bare task works when exactly one send-ready coding-agent pane exists across all workspaces. Send-ready means an exact live terminal/process, a scanned non-blocked approval state, and no proven questionnaire, editor, menu, or read-only viewer that owns input. For Codex, parsed working activity, an existing draft, and ordinary main-Composer visibility, stability, or exactness do not veto this user-priority path. Claude requires an empty recognized main Composer, no existing stashed draft, a known native footer, and no running or unproven foreground turn; background shells alone do not block it. Profiled Codex 0.154.0/0.155.1 collapsed async-question summaries remain sendable, while their expanded, clipped, or ambiguous editors receive zero AKK input. Codex physical fallback sends `C-u` once to replace the current Composer; Claude Code refuses an existing stashed draft before input. On a freshly empty main Composer it uses one `C-s` to check for a hidden stash; restored content stops task submission and remains for the user. It writes no sentinel and deletes no draft. Each then injects the request, waits through the paste window, and dispatches Enter exactly once without a post-text Composer veto. Broken AKK management state does not veto this user-explicit Send. If more than one pane is eligible, AKK stops instead of guessing: run `/akk list`, then use `/akk <selector>: <message>`, for example:
62
64
 
63
65
  ```text
64
66
  /akk @a1b2c3d4: inspect this repository and summarize it
@@ -68,7 +70,7 @@ Success returns a managed turn and, when the work finishes, its result. The same
68
70
 
69
71
  `/akk list` keeps that physical pane as the primary resource: it appears once in `terminals[]`. Read `screen_state` for the bounded live TUI, `native_identity_state` for foreground native-session resolution, and `durable_activity_state` for exact rollout/transcript task evidence. The legacy `activity_state` remains conservative for compatibility, so an idle screen can coexist with ambiguous native identity, unknown durable activity, and legacy `activity_state="unknown"`. These status axes are diagnostic; use only a current `available_actions` entry for mutations. Its managed context follows terminal → native coding-agent session → AKK `session_id` → Turns. AKK places the active Turn under `managed.current_turn`, or the newest retained Turn under `managed.recent_turn`; retained Turns do not occupy or hide the pane.
70
72
 
71
- For another request, refresh `/akk list` and use only that terminal row's listed v31 `send` action. A `session_exact` action carries `session_id`; `terminal_follow_current` and user-priority `terminal_user_explicit` actions carry `terminal_id`. Add only the new request text. The two target fields are mutually exclusive, and a structured model call never carries a selector, draft text, composer digest, or opaque token. AKK derives and revalidates its freshness fences internally. Managed delivery may require exact empty before input and creates a new `turn_id`; native inspection and lifecycle input remain exact-empty-only. Codex and Claude Code `terminal_user_explicit` advertise the agent-neutral `terminal_user_explicit_composer_policy=replace_current_composer_and_submit`; the older Codex-named field remains a compatibility alias. Codex freezes every open rollout as a candidate instead of trusting one stale root as the foreground thread, then binds the uniquely accepting rollout after Enter. For either agent, once the managed path injects user-explicit text or physical fallback runs, Composer observation cannot veto the one Enter after injection. If managed promotion is unavailable, the physical fallback creates no managed callback Turn; after Enter, AKK best-effort attaches an exact Terminal Watch callback and returns its `watch_id`. Once exact request acceptance is established, that Watch can notify and—after a same-controller Status refresh plus an explicit user answer—respond to a supported native interaction. Before acceptance and for best-effort activity Watches, interaction handling remains notification-only. Attachment failure is a warning and never changes delivery. Check `terminal_input_dispatched` separately from `agent_acceptance`, `management_mode`, and `observation_mode`; once clear or request input may have occurred, an uncertain result must not be retried automatically. A completed Turn is history, not the destination of the next send. Human-friendly selectors such as `codex`, `only`, or `@a1b2c3d4` remain slash-command discovery conveniences; they are not structured action authority.
73
+ For another request, refresh `/akk list` and use only that terminal row's listed v31 `send` action. A `session_exact` action carries `session_id`; `terminal_follow_current` and user-priority `terminal_user_explicit` actions carry `terminal_id`. Add only the new request text. The two target fields are mutually exclusive, and a structured model call never carries a selector, draft text, composer digest, or opaque token. AKK derives and revalidates its freshness fences internally. Managed delivery may require exact empty before input and creates a new `turn_id`; native inspection and lifecycle input remain exact-empty-only. Codex and Claude Code `terminal_user_explicit` advertise different Composer policies in action contract v35: Codex keeps `replace_current_composer_and_submit`, while Claude uses `require_empty_composer_and_submit`. The static `terminal_user_explicit_composer_policy=per_agent` points to `terminal_user_explicit_composer_policies`; the older Codex-named field remains a compatibility alias. Codex freezes every open rollout as a candidate instead of trusting one stale root as the foreground thread, then binds the uniquely accepting rollout after Enter. For either agent, once the managed path injects user-explicit text or physical fallback runs, Composer observation cannot veto the one Enter after injection. If managed promotion is unavailable, the physical fallback creates no managed callback Turn; after Enter, AKK best-effort attaches an exact Terminal Watch callback and returns its `watch_id`. Once exact request acceptance is established, that Watch can notify and—after a same-controller Status refresh plus an explicit user answer—respond to a supported native interaction. Before acceptance and for best-effort activity Watches, interaction handling remains notification-only. Attachment failure is a warning and never changes delivery. Check `terminal_input_dispatched` separately from `agent_acceptance`, `management_mode`, and `observation_mode`; once clear or request input may have occurred, an uncertain result must not be retried automatically. A completed Turn is history, not the destination of the next send. Human-friendly selectors such as `codex`, `only`, or `@a1b2c3d4` remain slash-command discovery conveniences; they are not structured action authority.
72
74
 
73
75
  If the coding agent asks a question and the active Turn becomes `waiting_for_openclaw`, use the listed `respond` action with its prefilled `turn_id`, or the equivalent form:
74
76