@scotthuang/agent-knock-knock 0.14.2 → 0.14.4

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 (131) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +233 -108
  3. package/dist/src/backend-callback-public-projection.d.ts +27 -0
  4. package/dist/src/backend-callback-public-projection.js +58 -0
  5. package/dist/src/backend-callback-public-projection.js.map +1 -0
  6. package/dist/src/backend-public-progress.d.ts +2 -0
  7. package/dist/src/backend-public-progress.js +4 -1
  8. package/dist/src/backend-public-progress.js.map +1 -1
  9. package/dist/src/backend-recovery-semantic.js +5 -4
  10. package/dist/src/backend-recovery-semantic.js.map +1 -1
  11. package/dist/src/callback-transport.d.ts +1 -1
  12. package/dist/src/callback-transport.js +2 -2
  13. package/dist/src/callback-transport.js.map +1 -1
  14. package/dist/src/claude-conversation-routing-cli-adapter.d.ts +2 -0
  15. package/dist/src/claude-conversation-routing-cli-adapter.js +127 -0
  16. package/dist/src/claude-conversation-routing-cli-adapter.js.map +1 -0
  17. package/dist/src/claude-conversation-routing-identity.d.ts +11 -0
  18. package/dist/src/claude-conversation-routing-identity.js +46 -0
  19. package/dist/src/claude-conversation-routing-identity.js.map +1 -0
  20. package/dist/src/claude-native-cli-adapter.d.ts +18 -0
  21. package/dist/src/claude-native-cli-adapter.js +159 -0
  22. package/dist/src/claude-native-cli-adapter.js.map +1 -0
  23. package/dist/src/claude-native-client.d.ts +57 -0
  24. package/dist/src/claude-native-client.js +197 -0
  25. package/dist/src/claude-native-client.js.map +1 -0
  26. package/dist/src/claude-native-discovery.d.ts +20 -0
  27. package/dist/src/claude-native-discovery.js +111 -0
  28. package/dist/src/claude-native-discovery.js.map +1 -0
  29. package/dist/src/claude-native-identity.d.ts +29 -0
  30. package/dist/src/claude-native-identity.js +54 -0
  31. package/dist/src/claude-native-identity.js.map +1 -0
  32. package/dist/src/claude-native-monitor.d.ts +13 -0
  33. package/dist/src/claude-native-monitor.js +123 -0
  34. package/dist/src/claude-native-monitor.js.map +1 -0
  35. package/dist/src/claude-native-observation.d.ts +54 -0
  36. package/dist/src/claude-native-observation.js +418 -0
  37. package/dist/src/claude-native-observation.js.map +1 -0
  38. package/dist/src/claude-native-outbox.d.ts +16 -0
  39. package/dist/src/claude-native-outbox.js +122 -0
  40. package/dist/src/claude-native-outbox.js.map +1 -0
  41. package/dist/src/claude-native-peer-helper.d.ts +2 -0
  42. package/dist/src/claude-native-peer-helper.js +121 -0
  43. package/dist/src/claude-native-peer-helper.js.map +1 -0
  44. package/dist/src/claude-native-public-projection.d.ts +605 -0
  45. package/dist/src/claude-native-public-projection.js +98 -0
  46. package/dist/src/claude-native-public-projection.js.map +1 -0
  47. package/dist/src/claude-native-runtime.d.ts +25 -0
  48. package/dist/src/claude-native-runtime.js +74 -0
  49. package/dist/src/claude-native-runtime.js.map +1 -0
  50. package/dist/src/claude-native-state-store.d.ts +49 -0
  51. package/dist/src/claude-native-state-store.js +96 -0
  52. package/dist/src/claude-native-state-store.js.map +1 -0
  53. package/dist/src/claude-native-task-service.d.ts +70 -0
  54. package/dist/src/claude-native-task-service.js +327 -0
  55. package/dist/src/claude-native-task-service.js.map +1 -0
  56. package/dist/src/cli-core.js +2 -1
  57. package/dist/src/cli-core.js.map +1 -1
  58. package/dist/src/cli-runtime-context.d.ts +2 -0
  59. package/dist/src/cli-runtime-context.js.map +1 -1
  60. package/dist/src/codex-native-cli-adapter.js +3 -4
  61. package/dist/src/codex-native-cli-adapter.js.map +1 -1
  62. package/dist/src/codex-native-client.d.ts +2 -0
  63. package/dist/src/codex-native-client.js +13 -3
  64. package/dist/src/codex-native-client.js.map +1 -1
  65. package/dist/src/codex-native-outbox.js +7 -5
  66. package/dist/src/codex-native-outbox.js.map +1 -1
  67. package/dist/src/codex-native-public-projection.d.ts +24 -8
  68. package/dist/src/codex-native-public-projection.js +38 -15
  69. package/dist/src/codex-native-public-projection.js.map +1 -1
  70. package/dist/src/codex-native-runtime.d.ts +1 -1
  71. package/dist/src/codex-native-runtime.js +15 -2
  72. package/dist/src/codex-native-runtime.js.map +1 -1
  73. package/dist/src/codex-native-semantic.js +15 -5
  74. package/dist/src/codex-native-semantic.js.map +1 -1
  75. package/dist/src/codex-native-state-store.d.ts +2 -0
  76. package/dist/src/codex-native-state-store.js +4 -2
  77. package/dist/src/codex-native-state-store.js.map +1 -1
  78. package/dist/src/codex-native-task-service.js +20 -4
  79. package/dist/src/codex-native-task-service.js.map +1 -1
  80. package/dist/src/conversation-list.js +30 -3
  81. package/dist/src/conversation-list.js.map +1 -1
  82. package/dist/src/conversation-routing-cli-adapter.d.ts +2 -7
  83. package/dist/src/conversation-routing-cli-adapter.js +4 -2
  84. package/dist/src/conversation-routing-cli-adapter.js.map +1 -1
  85. package/dist/src/conversation-routing-commands.d.ts +5 -0
  86. package/dist/src/conversation-routing-commands.js.map +1 -1
  87. package/dist/src/desktop-command-presentation.js +3 -1
  88. package/dist/src/desktop-command-presentation.js.map +1 -1
  89. package/dist/src/desktop-public-projection.js +3 -6
  90. package/dist/src/desktop-public-projection.js.map +1 -1
  91. package/dist/src/desktop-task-service.js +10 -3
  92. package/dist/src/desktop-task-service.js.map +1 -1
  93. package/dist/src/durable-notification-kernel.d.ts +10 -0
  94. package/dist/src/durable-notification-kernel.js +18 -1
  95. package/dist/src/durable-notification-kernel.js.map +1 -1
  96. package/dist/src/host-monitor-reconciliation.js +9 -1
  97. package/dist/src/host-monitor-reconciliation.js.map +1 -1
  98. package/dist/src/host-profile-runtime.js +3 -1
  99. package/dist/src/host-profile-runtime.js.map +1 -1
  100. package/dist/src/local-codex-cli-adapter.js +4 -3
  101. package/dist/src/local-codex-cli-adapter.js.map +1 -1
  102. package/dist/src/openclaw-callback-evidence.d.ts +17 -0
  103. package/dist/src/openclaw-callback-evidence.js +75 -0
  104. package/dist/src/openclaw-callback-evidence.js.map +1 -0
  105. package/dist/src/openclaw-callback-transport.js +90 -9
  106. package/dist/src/openclaw-callback-transport.js.map +1 -1
  107. package/dist/src/semantic-conversation-target.js +1 -1
  108. package/dist/src/semantic-conversation-target.js.map +1 -1
  109. package/dist/src/semantic-tool-command-helpers.d.ts +0 -1
  110. package/dist/src/semantic-tool-command-helpers.js +45 -19
  111. package/dist/src/semantic-tool-command-helpers.js.map +1 -1
  112. package/dist/src/semantic-tool-descriptions.js +3 -3
  113. package/dist/src/semantic-tool-descriptions.js.map +1 -1
  114. package/dist/src/semantic-tool-list-projection.js +13 -6
  115. package/dist/src/semantic-tool-list-projection.js.map +1 -1
  116. package/dist/src/semantic-tool-presentation.js +17 -3
  117. package/dist/src/semantic-tool-presentation.js.map +1 -1
  118. package/dist/src/semantic-tool-runtime.js +8 -1
  119. package/dist/src/semantic-tool-runtime.js.map +1 -1
  120. package/dist/src/semantic-tool-schemas.js +15 -15
  121. package/dist/src/semantic-tool-schemas.js.map +1 -1
  122. package/dist/src/terminal-list-cli-adapter.js +5 -1
  123. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  124. package/dist/src/terminal-list-ownership-service.js +1 -1
  125. package/dist/src/terminal-list-ownership-service.js.map +1 -1
  126. package/docs/backend-task-recovery.md +43 -0
  127. package/docs/claude-cli-direct.md +60 -0
  128. package/docs/codex-0.162.1-compatibility.md +65 -10
  129. package/docs/codex-cli-native-compatibility.md +21 -0
  130. package/package.json +2 -2
  131. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +14 -4
@@ -0,0 +1,60 @@
1
+ # Claude Code direct control
2
+
3
+ AKK **0.14.3** adds basic control of an already-open Claude Code CLI without tmux or Herdr. No Claude plugin, hook, special launch argument, replacement agent, or restart is required.
4
+
5
+ The initial live-tested combination is **Claude Code `2.1.296` on macOS**, using native peer protocol `1`. This is a tested version, not a claimed minimum or a promise that every newer version works. Discovery checks the running CLI's registry, native session UUID, PID/start time, and socket identity. A compatible runtime contract is required; unknown identity or protocol is not guessed.
6
+
7
+ 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.
8
+
9
+ ## What works
10
+
11
+ | Capability | Direct connection |
12
+ | --- | --- |
13
+ | Discover and select an existing CLI | Exact native session and process identity; separate sessions in the same directory remain separate |
14
+ | Send a task | Allowed when the selected CLI is verified idle; Send creates its own durable Watch |
15
+ | Status | Native activity plus bounded public text and tool-action summaries from the exact input's local transcript |
16
+ | Watch an existing task | Requires a verified, currently active root input; no prompt insertion |
17
+ | Completion and exit observation | Parent-chain and tool-result evidence; an idle state alone is not success |
18
+ | Recovery | Inspect/reconcile an existing Watch, explicitly renew it, stop observation, close Send management, and retry a known retryable callback |
19
+ | Approvals and blocking questions | Registry waiting hints only; no direct approval or answer submission, and no promise of comprehensive interaction notifications |
20
+ | Models, permissions, cancellation, new/clear/resume | Unavailable through this direct connection |
21
+
22
+ For an unsupported operation, return to the original Claude Code terminal. If that same session also has an eligible tmux/Herdr connection, AKK can route an already-supported special operation through its terminal adapter. This does not add terminal capabilities for unreviewed versions or unsupported dialogs. Core operations still prefer the direct connection.
23
+
24
+ The terminal and direct paths must agree on the native UUID, PID and process start; matching a directory or a title is insufficient. Busy, blocked, refused, or uncertain sends do not trigger a second send through a terminal.
25
+
26
+ ## Use it
27
+
28
+ Keep the authenticated Claude Code CLI open and ask your controller to refresh `agent_knock_knock_list`. Select its exact conversation ID from the returned actions. A task request can be as simple as:
29
+
30
+ > Use AKK to ask Claude Code in my-project to inspect the failing tests. Tell me when it finishes.
31
+
32
+ Save the `watch_id` returned by Send. It already identifies the completion monitor; do not add another Watch for that task. Use Status on the conversation for its latest input, or on the Watch for its exact saved input. For a task started manually in the CLI, explicitly ask the controller to Watch it.
33
+
34
+ The usual `CLAUDE_CONFIG_DIR` is respected. 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. Busy Send is rejected because Claude can absorb an inbound message into the task already running.
35
+
36
+ ## Read the result correctly
37
+
38
+ - `delivered` and `agent_acceptance: proven` require the submitted input UUID, peer message ID and actual sender PID in the native transcript. A successful socket write alone does not prove acceptance.
39
+ - `native_thread_id` is the Claude session UUID. `native_input_id` identifies a user input, with `task_anchor_kind: native_input_uuid`; it is not a fabricated native turn ID.
40
+ - `completed`, `interrupted`, `failed`, and `exited` are different outcomes. Completion means the exact native task finished, not that its requested objective or every tool call succeeded. If the original process exits, a later process resuming the same history is not substituted.
41
+ - A registry permission/input wait can be shown as a manual-action hint. Requests have not been exhaustively scanned: `pending_interaction_count: null` means unknown, not zero.
42
+ - `callback_expected` describes pending/future controller delivery. It normally becomes false after the completed callback has been accepted. Controller acceptance does not prove delivery to a downstream chat channel.
43
+
44
+ Status limits its public progress body to **800 Unicode code points**, after redaction and at complete grapheme boundaries. It excludes hidden reasoning, raw long tool output, full arguments and diffs. The final public result is also bounded and reports truncation. `read_at` is the read time; `latest_item_at` comes from a native record or is null. List does not include progress or final-result bodies.
45
+
46
+ Reads are bounded to the most recent 16 MiB of the exact session transcript. A missing old anchor, conflicting parent chain, replaced transcript, unsupported asynchronous/background work, or unavailable native record produces an explicit unknown/read error. AKK does not borrow a later task's result or treat idle as completion. Resumed histories can contain old record replays; only the selected input's proven causal chain is used.
47
+
48
+ ## Monitoring and recovery
49
+
50
+ Send and explicit Watch share the **720-minute default hard deadline**, with a two-second observation interval. The deadline is separate from a terminal-managed task's 60-minute inactivity window. Expiration stops that observation; it does not cancel Claude's task or silently create another Watch.
51
+
52
+ Use an explicit renewal on the existing Watch only when the same native input is still active. A completed, failed, interrupted, or exited task cannot renew. `recover` reconciles saved state; it neither resends the prompt nor extends the deadline. `close` ends AKK's management of a Send, while `unwatch` stops observation. Neither cancels Claude. 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 shared concepts.
53
+
54
+ 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.
55
+
56
+ ## Protocol and verification boundary
57
+
58
+ This adapter uses Claude's local agent registry, Unix-domain inbox and native transcript. The complete peer wire format and transcript schema are version-sensitive implementation details, not a guarantee of a permanently stable public API. AKK checks the contract and fails closed on unverifiable identities and task outcomes; it does not attach to a new SDK/headless process and call that control of the original CLI.
59
+
60
+ The isolated research and implementation checks cover native discovery, exact sender/input acceptance, public result observation, same-directory separation, rejected busy sends and uncertain outcomes. Synthetic regressions additionally cover transcript replay/compaction history, identity conflicts, late receipt races, task isolation, callback deduplication and recovery. Broader operating-system support and all native interaction/control APIs remain outside this first direct adapter.
@@ -6,6 +6,10 @@ new numeric minimum or a promise that future Codex versions use the same UI.
6
6
  The [CLI direct-control guide](codex-cli-native-compatibility.md) describes the
7
7
  separate shared-backend route, which does not need tmux or Herdr.
8
8
 
9
+ The empty-thread initialization change below ships in **AKK 0.14.4**. Its dedicated
10
+ 2026-10-12 verification is recorded separately from the earlier 0.14.2 release
11
+ matrix.
12
+
9
13
  ## Native status and error contract
10
14
 
11
15
  Codex changed the `/status` informational usage link from
@@ -92,10 +96,10 @@ envelope, with no automatic duplicate response.
92
96
 
93
97
  The upstream resume path in both reviewed versions requires persisted history.
94
98
  A newly loaded, idle, empty thread may expose live metadata before any rollout
95
- exists. AKK preserves that verified identity as
96
- `history_state: "unmaterialized"`, but does not advertise Send or permission
97
- actions that require a native subscription. Status and native inspection can
98
- return the fresh idle metadata with
99
+ exists. AKK 0.14.2 preserved that verified identity as
100
+ `history_state: "unmaterialized"` but withheld Send and permission actions because
101
+ its Send preflight required a history subscription. Status and native inspection
102
+ can return the fresh idle metadata with
99
103
  `subscription_state: "unavailable_unmaterialized_history"` and
100
104
  `observation_error: "native_subscription_unmaterialized"`. Its
101
105
  `interaction_requests_scanned: false` and null pending-interaction count mean
@@ -103,6 +107,57 @@ requests were not scanned, rather than proving that no question or approval
103
107
  exists. This diagnostic fallback requires the exact missing-rollout condition
104
108
  and a fresh same-thread idle/empty read; it does not accept unrelated failures.
105
109
 
110
+ ### First task in an existing empty thread (AKK 0.14.4)
111
+
112
+ The direct adapter now distinguishes submission from history subscription.
113
+ An exact, loaded main CLI thread with paginated history, idle state, no turns
114
+ and no pending interactions can accept its first task via `turn/start` on that
115
+ same owner. A typed missing-history subscription error and a fresh empty-thread
116
+ read permit this path; arbitrary subscription failures do not. It does not
117
+ create, resume, fork or cold-load another conversation, and it does not change
118
+ the thread's permissions. Permission and interaction controls remain unavailable
119
+ until their native subscription is usable.
120
+
121
+ AKK saves the submission identity before dispatch and verifies the returned
122
+ turn against its persisted user input. A native ACK alone is reported as
123
+ `submission_state: "acknowledged"` with `native_receipt_turn_id`, while the exact
124
+ anchor and `agent_acceptance` remain unproven until history is verified. The
125
+ existing Watch observes that same submission; an observation delay is not a
126
+ reason to send again or add another Watch. Unknown acceptance never causes
127
+ automatic redispatch or a terminal fallback. List's linked terminal Send/Watch
128
+ offers now reflect the selected backend's capabilities without removing
129
+ terminal-only model or recovery operations.
130
+
131
+ Materialization happens when the first user input is recorded, not when its
132
+ task completes. A user does not need to finish a manual first round to initialize
133
+ an already loaded, eligible thread.
134
+
135
+ Before submission, a failed preflight is persisted under the same message-ID
136
+ lock as the send reservation. Concurrent calls reuse whichever outcome was
137
+ reserved first; a late preflight failure cannot replace an accepted submission.
138
+ The failed record reports `failure_stage: "native_preflight"`,
139
+ `request_dispatched: false`, `delivery_receipt: "not_sent"` and no active
140
+ observation or callback. It is an audit record, not a running native task;
141
+ replaying that message ID never submits it later.
142
+
143
+ Dedicated live verification on 2026-10-12 used macOS Codex CLI **0.162.1** and
144
+ shared backend **0.162.1**, two new CLI sessions launched through the existing
145
+ proxy wrapper, and an isolated AKK store with a local notification collector:
146
+
147
+ | Case | Observed result |
148
+ | --- | --- |
149
+ | First task with no previous user input | Verified loaded idle thread, unmaterialized history and null latest turn before Send; the original thread accepted exactly one task, displayed its result in the original CLI and produced one local completion acknowledgement. |
150
+ | First task immediately requesting command approval | The original empty thread accepted the task; AKK identified the exact approval, allowed the dedicated harmless `printf` command once, verified exit code 0 and its output, and produced one interaction notification plus one completion acknowledgement. |
151
+ | Duplicate Send and observer reconnect | Both cases retained the same task ID and deadline, one native turn, and one completion notification after repeating the same message ID and reconnecting observation. |
152
+
153
+ The PTYs only hosted the dedicated CLIs; tasks and approval responses used the
154
+ native backend. No user work conversation, Gateway or real messaging channel
155
+ was used. Both test CLIs were stopped afterward. The live cases exercised the
156
+ built native runtime, task service and local outbox; terminal-alias routing and
157
+ public tool projections are covered by fast regressions. Lost ACKs, delayed
158
+ history, concurrent preflight failures and pending-request replay also have
159
+ isolated regression coverage; no live fault-injection claim is made.
160
+
106
161
  ## Version and route boundaries
107
162
 
108
163
  | Route | Compatibility rule |
@@ -129,7 +184,7 @@ evidence. The formal release gate also passed as recorded below.
129
184
  | Earlier 0.14.1 targeted live proof | macOS CLI 0.162.1 + shared app-server 0.162.1: bounded public progress during an active task, 720-minute Send monitoring, one local completion acknowledgement and idempotent Send. |
130
185
  | Dedicated frontend/backend pair | macOS CLI 0.162.1 + shared app-server 0.162.1, launched through the existing `mycodes --remote` wrapper in a dedicated test session. |
131
186
  | Native status, exact identity and List | Passed: the closed native `/status` transaction proved the exact thread and enabled alias coalescing; subsequent materialized-thread backend Status read the same target. |
132
- | Unmaterialized empty thread | Passed in a separate dedicated 0.162.1/0.162.1 CLI: List withheld Send/permission offers, Status/native inspection retained verified idle identity with unscanned requests and a null pending count, and an attempted semantic Send was rejected before a native turn, Watch or callback was created. The thread stayed empty and global configuration was unchanged. |
187
+ | Unmaterialized empty thread, 0.14.2 behavior | Passed in a separate dedicated 0.162.1/0.162.1 CLI: List withheld Send/permission offers, Status/native inspection retained verified idle identity with unscanned requests and a null pending count, and an attempted semantic Send was rejected before a native turn, Watch or callback was created. This is historical rejection evidence, not verification of the AKK 0.14.4 first-task initialization path. |
133
188
  | Model discovery | Passed: the public model-options operation read seven native models and restored the composer. Model mutation was intentionally not exercised because the existing terminal setter persists defaults; its scope remains covered by source review and regressions. |
134
189
  | Backend permissions | Passed: Default, Full Access and Read Only round trips retained the selected native thread. This is backend permission evidence, not a terminal menu round-trip claim. |
135
190
  | Routed Send, Status, Watch and completion | Passed: Send through the terminal alias selected the native backend, proved acceptance and a 720-minute deadline; Status using the returned native conversation ID and Watch ID read the same active turn and bounded progress. The exact turn completed with one local callback acknowledgement; idempotent Send retained the original Watch and deadline. Reading the old Watch after later turns still returned its original task's progress without later-task text. |
@@ -174,11 +229,11 @@ monitoring state. Unwatch is not native cancellation or task completion.
174
229
  - Direct CLI model control and cancellation still require an eligible verified
175
230
  terminal capability. Native new/clear/resume remains unsupported for these
176
231
  paginated versions; adding a version profile does not enable lifecycle work.
177
- - A newly loaded CLI thread with no materialized history is not automatically
178
- writable through the direct adapter: upstream `thread/resume` requires stored
179
- history. Reading its live metadata is different from acquiring a task/response
180
- channel. Such a thread must not be advertised as Send-ready solely because it
181
- is loaded and idle.
232
+ - The AKK 0.14.4 first-task path requires an exact loaded main CLI owner and
233
+ the strict empty-thread conditions above. A title, directory, unloaded history
234
+ or mere idle indicator is insufficient. Submission and subscription readiness
235
+ are separate; the initialization path does not enable unsupported lifecycle
236
+ operations or permission control before a verified subscription.
182
237
  - The Status public body remains bounded to 800 Unicode code points, with
183
238
  redaction, grapheme-safe truncation and exact-turn freshness/error reporting.
184
239
  List gains no progress body or pagination changes in this release.
@@ -57,6 +57,27 @@ For native Watch and response commands, use the exact returned Watch or
57
57
  interaction ID. Watch IDs can be UUIDs or deterministic submission hashes;
58
58
  they are opaque, not values to construct.
59
59
 
60
+ ### First task in a new, already open CLI thread (AKK 0.14.4)
61
+
62
+ AKK 0.14.4 permits Send to an exactly identified, loaded,
63
+ idle main CLI thread before its first task has created paginated history.
64
+ AKK submits to that original thread, then connects its existing Send Watch as
65
+ the task history becomes available. No manual first message or completed round
66
+ is required. This is not support for creating or cold-loading a conversation.
67
+
68
+ Approval and permission controls still require a usable native subscription;
69
+ before then, Status keeps pending-interaction count unknown rather than claiming
70
+ zero requests. A Send receipt with `submission_state: "acknowledged"` and
71
+ `native_receipt_turn_id` means Codex returned a task receipt but AKK is still
72
+ verifying the exact input in history. Follow the returned Watch, without resending
73
+ the task or adding another Watch. Only verified history produces
74
+ `agent_acceptance: "proven"`. Connection or identity errors do not authorize
75
+ switching transports after a possibly submitted task.
76
+
77
+ See the [0.162.1 report](codex-0.162.1-compatibility.md#first-task-in-an-existing-empty-thread-akk-0144)
78
+ for the distinction between the earlier released rejection behavior and the
79
+ 0.14.4 first-task behavior.
80
+
60
81
  ## Automatic conversation routing (2026-10-10)
61
82
 
62
83
  For conversation operations, select the conversation and requested action,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scotthuang/agent-knock-knock",
3
- "version": "0.14.2",
4
- "description": "Control Codex CLI through its shared backend, Codex Desktop through native IPC, and Codex or Claude Code through terminals from OpenClaw or compatible controller Hosts.",
3
+ "version": "0.14.4",
4
+ "description": "Delegate to existing Codex CLI, Codex Desktop, and Claude Code sessions from OpenClaw or compatible controller Hosts, with native direct control and supported terminal fallbacks.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/scotthuang/agent-knock-knock#readme",
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: agent-knock-knock
3
- description: Discover and control loaded Codex CLI threads, existing Codex Desktop conversations, or Codex and Claude Code tmux/Herdr terminals with Agent Knock Knock.
3
+ description: Use Agent Knock Knock to discover, send tasks to, and observe existing Codex CLI, Codex Desktop, or Claude Code conversations through their supported direct or terminal connections.
4
4
  ---
5
5
 
6
6
  # Agent Knock Knock
7
7
 
8
8
  Use this skill when the user explicitly invokes `AKK`, `akk`, or `Agent Knock Knock`, or asks a supported controller Host to inspect or control a coding-agent conversation listed by AKK.
9
9
 
10
- AKK supports loaded local Codex CLI threads through their shared backend, existing local Codex Desktop conversations, and Codex or Claude Code already running inside tmux or local Herdr `0.8.0`. It never launches a replacement coding agent. The controller Host, AKK, the coding agent, and its Desktop app or terminal host must run as the same OS user.
10
+ AKK supports loaded local Codex CLI threads through their shared backend, existing local Codex Desktop conversations, compatible already-open Claude Code CLIs through their native inbox, and Codex or Claude Code already running inside tmux or local Herdr `0.8.0`. It never launches a replacement coding agent. The controller Host, AKK, the coding agent, and its Desktop app or terminal host must run as the same OS user.
11
11
 
12
12
  Treat `AKK` and `akk` the same way.
13
13
 
@@ -19,9 +19,9 @@ Keep the user's requested scope and approval boundaries. Do not expand a task, a
19
19
 
20
20
  ## Choose a conversation
21
21
 
22
- Use `conversations[]` from List as the primary collection and select by title, project and current identity. Choose the row's exact conversation and advertised operation; AKK chooses the route, including Status, Send, Watch and permission controls. Callers do not select between a backend and a terminal. For a proven terminal/backend match, `terminal_controls[]` preserves that terminal’s managed Turns, recovery and capability-specific actions inside the conversation row; these are controls for the same conversation, not extra tasks. The raw CLI retains `terminals[]`, `codex_cli_sessions[]` and `desktop_sessions[]` for compatibility and private authority, but do not present these again as extra conversations when `conversations[]` exists.
22
+ Use `conversations[]` from List as the primary collection and select by title, project and current identity. Choose the row's exact conversation and advertised operation; AKK chooses the route, including Status, Send, Watch and permission controls. Callers do not select between a backend and a terminal. For a proven terminal/backend match, `terminal_controls[]` preserves that terminal’s managed Turns, recovery and capability-specific actions inside the conversation row; these are controls for the same conversation, not extra tasks. The raw CLI retains `terminals[]`, `codex_cli_sessions[]`, `claude_cli_sessions[]` and `desktop_sessions[]` for compatibility and private authority, but do not present these again as extra conversations when `conversations[]` exists.
23
23
 
24
- AKK prefers the reachable Codex backend only when it proves the exact current native thread. A terminal and backend row merge only with exact identity evidence, never matching cwd, title, newest history or version alone. Unresolved representations may remain separate; do not assume they are different tasks or send twice. The routing diagnostics describe available evidence, not authority to skip a guard. An unavailable backend may retain an eligible terminal path; a busy, blocked or mismatched native task is not an excuse to try terminal input. For a selected physical terminal without a proven native anchor, targeted conversation operations, including Status, may run an advertised idle-only `/status` identity inspection when backend candidates exist. This can display a native status card but submits no user task; a working or blocked terminal is not interrupted. List sends no terminal input. If a dispatch is uncertain, keep its receipt and inspect it instead of retrying another route.
24
+ AKK prefers a reachable direct connection only when it proves the exact current native session and process or thread. A terminal and backend row merge only with exact identity evidence, never matching cwd, title, newest history or version alone. Unresolved representations may remain separate; do not assume they are different tasks or send twice. The routing diagnostics describe available evidence, not authority to skip a guard. An unavailable backend may retain an eligible terminal path; a busy, blocked or mismatched native task is not an excuse to try terminal input. For a selected physical terminal without a proven native anchor, targeted conversation operations, including Status, may run an advertised idle-only `/status` identity inspection when backend candidates exist. This can display a native status card but submits no user task; a working or blocked terminal is not interrupted. List sends no terminal input. If a dispatch is uncertain, keep its receipt and inspect it instead of retrying another route.
25
25
 
26
26
  Use the returned `watch_id` or `turn_id` for that task's follow-up. Existing Watches and pending interactions keep their task and route. After a question or approval callback, refresh that exact Status and copy the current interaction action; do not translate its IDs to another transport. Permission operations prefer the verified backend. Backend task recovery retains the original task identity and provider. Terminal binding/menu recovery, model and lifecycle operations retain their separately advertised capability; the caller does not pick a transport. The route-specific guidance below explains those capabilities and result boundaries, not an additional route-selection step.
27
27
 
@@ -49,6 +49,16 @@ A `conversations[]` row with `source="codex_cli"` uses an exact `codex-cli:v1:..
49
49
 
50
50
  Use AKK's advertised actions and read the actual operation result after backend upgrades. A missing backend method fails that operation with an unsupported-capability diagnostic; it does not justify sending UI input to a guessed terminal. Existing terminal and Desktop capabilities retain their own limits. Model selection and native thread lifecycle operations are not added to this direct route.
51
51
 
52
+ ## Direct Claude Code
53
+
54
+ Rows with `source="claude_cli"` use `claude-cli:v1:...` IDs for an already-running native CLI. This path is live-tested on macOS with Claude Code `2.1.296` and peer protocol `1`; Python 3 is required on the AKK side. It needs no Claude plugin, hook, special launch arguments or replacement process. Use actual advertised capabilities after upgrades, not a version number alone.
55
+
56
+ - Send to a verified idle conversation. Keep its `claude-cli-watch:...` receipt: Send already creates completion monitoring with the shared 720-minute hard deadline. Do not add another Watch for that Send. Busy/blocked, held/refused or uncertain delivery must not be retried through terminal input.
57
+ - Status on the conversation reads its latest input; Status on the Watch reads its original exact `native_input_id`. This is an input UUID, not a native turn ID. Public progress and tool-action summaries are bounded to 800 code points; List has no progress body. `agent_acceptance: proven` requires exact native sender/message/input evidence, not merely a socket write.
58
+ - Watch a manually started active task using the conversation action. Keep the returned Watch through task changes. Idle is not success; `exited` means the original process ended without proof of completion. A new process resuming the same history is not silently substituted.
59
+ - Use the advertised Recover, Unwatch, Close and retry-callback actions on the original task. Explicit Renew requires that same input still active; settled or exited tasks cannot renew. Accepted or uncertain callbacks are not replayed. Callback acceptance proves delivery to the controller, not to a downstream chat channel.
60
+ - Direct approvals, question answers, models, permissions, cancellation and lifecycle commands are unavailable. Registry waiting hints may indicate manual attention, but `pending_interaction_count: null` means unknown and interaction notification is not guaranteed. Report `manual_required` and return to the original Claude terminal. If an exact eligible tmux/Herdr counterpart exists, AKK retains its advertised special controls automatically; their original version and safety limits still apply.
61
+
52
62
  ## Codex Desktop
53
63
 
54
64
  Desktop rows in `conversations[]` have `source="codex_desktop"` and a full `desktop:v1:...` conversation ID. Their owner identity is separate from terminal selectors, managed Sessions, and managed Turns. The terminal-specific instructions below do not grant Desktop input authority.