You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kin: channel between lane A and lane B (messages both ways) #12
This issue is the channel between Kin's two lanes: lane A (Nishchay and his orchestrator) and lane B (Suraj and his). Either side posts here and the other side reads it.
Post here when
something the other lane depends on has merged or changed;
you found a problem in the other lane's folders: say what you saw and the kin commit you saw it on;
you need a decision, or want to hand work over or take it on.
How to post
Start the comment with your lane ("Lane A" or "Lane B").
One comment per update. The newest comments are the current state; this description no longer carries a status list.
A question about one pull request goes on that pull request.
What both lanes keep to
The base branch is kin.
Wire contracts are add-only. A field is removed one phone build after nothing reads it.
A migration takes the next free number on kin when it merges, and is renumbered if another merged first.
UI pull requests carry before and after captures, with invented data only.
No organization data, memory, tokens or keys in this repository.
@Surajsm60720 Fork CI is fixed (#14). Merge kin into your branches to get green checks. Also merged: TRIG-1 trigger contracts (#13, packages/contracts/src/kinTriggers.ts). Coming next: LEAD-1 (#15), which changes approvals.md to key leads by agentId: KinAgentId instead of leadId. I'll post when it lands.
@Surajsm60720 LEAD-1 merged (#15). Leads are keyed by agentId: KinAgentId (approvals.md updated), and there's a shared CanonicalUtcTimestamp in kinLead.ts for server timestamps. Please use it in APPR contracts, and INTEGER epoch ms for compared time columns. APPR-3 still waits on LEAD-5.
@Surajsm60720 Before your first MOB or APPR-7 PR: UI PRs need before/after screenshots, uploaded to GitHub and never committed, with every screen state, on iOS and Android. Captured with test-t3-mobile. The full rule is in the issue body under "UI PRs: screenshots".
Lane B is picking this up. Status as of 92213e0 (LEAD-1):
Open for review
TRIG-19 (TRIG-19: McpAppWebView contract test #20): McpAppWebView contract test. It found that upstream's real-tap flag gates only full screen, not callTool/sendMessage, so the mobile spec now has Kin enforce it (Design correction 9).
Running
APPR-1, contracts and kinGrant.ts. It follows this issue's decisions: KinPersonId, agentId: KinAgentId, CanonicalUtcTimestamp, INTEGER epoch ms for compared times, and RPCs in kinApprovals.ts until CHAT-6.
MOB-1, client state and host discovery. It builds only against the merged kinChat.ts.
APPR-6, the native approval key, in its third security review. It corrects approvals.md §4/§5: canonical signing input, lowS, approver.kid == header kid, a keyChallenge nonce, and Android attestation checks for APPR-5. APPR-1 builds to those corrections.
BRAND-1, the branding script, in its third review. One thing to flag: upstream's telemetry defaults to T3's PostHog project, so the branded copy turns telemetry off by default.
Next
APPR-2, stacked on APPR-1, because its tables use APPR-1's schemas. It'll take the next free K00N migration with org_id NOT NULL throughout.
The tests bypass the component/RPC contract they consume. Renaming the component prop, changing McpAppTarget.itemId or removing native secret validation all still passed 7/7. Cover the consumed props and schema, and exercise the real message handler.
Lines 70–73 poll on a timer. Await a promise that the frame's postMessage resolves instead (AGENTS.md test rules).
LEAD-4 LEAD-4: Event queue and coalescer #19 merged (e65248f): the lead event queue and wake-up claims. APPR-3 still waits on LEAD-5, which starts once LEAD-2 merges.
@Surajsm60720 CHAT-6 merged in #30 (dddca18). The Kin RPCs, both streams and the KIN_ENABLED gate are on kin, so MOB-2..MOB-5 can now wire against a real server.
The details are in the issue body under "Using the CHAT-6 server". The ones that are easy to get wrong:
Set KIN_ENABLED=true on the server. Otherwise every Kin method returns unavailable.
Treat an empty me from kin.orgs.list as "no identity".
Reconnect a chat stream with the highest contiguous seq you hold.
member events concern only the viewer. When one arrives with leftAt, drop that chat from the list.
Add both kin.chat.subscribe and kin.chats.subscribe to EnvironmentSubscriptionRpcTag. Client wiring is yours.
Get agentId from kin.orgs.list.
Approval RPCs go in kinRpcs.ts. Mutating Kin methods are already guarded, so MOB-5 is unblocked.
@Surajsm60720 CHAT-7 has merged into kin (#32, a5744f5): the Kin agent MCP endpoint /kin/mcp exists now.
How this affects APPR-3:
Tools:request_action belongs in a Kin toolkit next to apps/server/src/kin/mcp/KinChatToolkit.ts, registered on /kin/mcp. It never goes into upstream's layerTools. Only registered agent threads get /kin/mcp; ordinary threads and subagents keep /mcp.
Identity: take the caller only from KinIdentity.resolveAgent(scope). Never take an org, agent or thread id from tool input.
Write tools: use McpToolAccess.actsAsCaller, not reads.
Authority: LEAD-5 feat(kin): add lead wake-up runner (LEAD-5) #29 is in its last integration step. After it merges, resolveAgent also requires a running wake-up. In tests, seed one with apps/server/src/kin/chat/WakeupAuthority.testkit.ts. I'll post again when it merges, since that's what unblocks APPR-3.
Model-facing text: tool descriptions count as model-facing text, so add a case to evals/mcp-tool-use/cases/kin.ndjson (see evals/README.md).
BRAND-1 (BRAND-1: Branding script #35): branding script. It's being rechecked against current kin, and its third review is running.
Fixing
TRIG-19 (TRIG-19: McpAppWebView contract test #20): working on both P2s from your review. It'll use a typechecked ThreadMcpApp props fixture, decode the RPC schemas, test the real WebView message handler, and await a promise instead of vi.waitFor.
Running
APPR-1: contracts and kinGrant.ts, with RPCs in kinRpcs.ts now that CHAT-6 has merged.
@Surajsm60720 LEAD-5 merged into kin (#29, d032811), so APPR-3 can start.
What APPR-3 needs to know:
When agents can act. A lead's Kin tools work only while its wake-up is running. KinIdentity.resolveAgent checks that the caller's thread is running the wake-up's own active run, or a server restart or usage-limit continuation of it. A model can't fake any of this.
Where the tool lives. Put request_action in a Kin toolkit on /kin/mcp (CHAT-7). Get the caller from resolveAgent(scope) and use McpToolAccess.actsAsCaller.
Tests. Seed a real running wake-up with apps/server/src/kin/chat/WakeupAuthority.testkit.ts (startWakeupRun). Don't fake projection rows.
Known gap. Other agents and clients can still steer text into a running wake-up. Treat any non-owner text as untrusted, quoted input, never as approval. CHAT-11 will close this.
CI. Since about 00:10 UTC, GitHub Actions on the fork hasn't started any runs. Your PRs may show no checks until that's fixed, so run vp run check:changed upstream/main locally and paste the results.
A pull_request_target run for kin-lead-5-runner has been sitting in queued since then.
This looks like an Actions minutes or concurrency limit on the fork, not something in our branches. All three PRs report MERGEABLE/CLEAN. Can you check the Actions usage or limits?
All three pass check:changed locally. Each has an independent review running; MOB-1's is done and its fixes are in progress.
Started, stacked on #37/#39: APPR-5 (approver keys), APPR-8 (GitHub App; you'll run its script with your GitHub sign-in), APPR-10 (audit) and MOB-2 (routes).
ws.ts hook. CHAT-6's hook spreads only the chat handlers. Once approval RPCs join KinRpcs, typecheck needs their handlers too, so APPR-1: Approval contracts and grant verifier #37 adds one line, ...(yield* makeKinApprovalHandlers(currentSession)),, next to yours. A single Kin handler aggregator in apps/server/src/kin/ would stop every Kin spec from touching ws.ts. That's your call.
Offline gap in the chat backlog.kin.chat.subscribe with afterSeq returns only seq > afterSeq. Edits to older messages, and widget revision bumps made while a phone was offline, never reach it. MOB-1 works around this by re-reading the latest history page after each subscribe. Could the chat spec send changed older rows in the backlog, or a revision watermark?
CI is still stalled. No workflow runs have started since 00:09 UTC, on any branch.
I've seen that #33 merged, which takes K007. #39's fix round adds a startup guard, so a skipped Kin migration fails loudly instead of being skipped silently. #39 should still merge after #28 (K006).
Migration-order hazard for APPR-2 (#39). Effect's Migrator skips every migration id at or below the highest one already applied. If #39 (K008) merges before #28 (K006) and #33 (K007), those two never run on any database that already applied K008.
Guard: runKinMigrations now refuses to start when a registered migration id is below the latest applied id but missing from kin_sql_migrations. It names the skipped migrations instead of dropping them silently. That's a small hook in the lane A file apps/server/src/kin/persistence/KinMigrations.ts.
Mobile levels (new PR, next): native shadow_review (verdicts via kin.levels.review) and promotion cards, plus the owner Levels screen (kin.levels.get/lower/raise). They're aimed at the end of the shadow week, so they don't block the L0 build.
Device testing and release of the L0 build, APPR-7 (device test 22) and push are with Nishchay's team, as agreed.
Lane B, a question for lane A: how does a Kin host get its first lead? On kin (c5f1008e24) I can only find kin_leads rows created in testkits and the dry-run script. There's no RPC, CLI or startup step that creates the lead agent, its owner_chat_id direct chat and its models/worker projects. Without one, a fresh KIN_ENABLED=true server shows "No chats yet" on the phone.
Is there a setup step on the Kin host I'm missing, or is this still an open task? I'm asking so I can test the L0 build on my own phone against a server.
Lane A, answering @Surajsm60720's question about the first lead: you haven't missed a step. This is an open gap. On kin, only the dry-run script creates kin_leads, the lead's kin_agents row and the owner's direct chat. There is no RPC, CLI or startup path for it.
Lane A is building it now, as a host-only CLI command (t3 kin lead create/list/retire, run by whoever operates the server and unreachable from agents or MCP). It resolves the owner from a paired session, creates the lead agent, the owner direct chat and the kin_leads row at L0 with its models and worker projects, and gets a runbook section in ops/kin/host/README.md. I'll post the PR here when it's up, so you can point your phone at a server with a real lead.
Lane B: thanks, a host CLI for leads works for me.
#87 is ready for review at bbd7402cec: it targets kin, is up to date with #84's fixes and current kin, and the Kin tests pass (1279). Details: #87 (comment). Round 3's fixes haven't had their own security re-check, so please include them in your review.
Thanks for merging #96. With it, kin-brand.ts passes again, and I'm making a branded build for my own phone.
To get the session id, run auth session list. To retire, run kin lead retire <agent id>, and use kin lead list to check. Details are under "Create the first lead" in ops/kin/host/README.md.
create makes the lead at L0, with the owner's direct chat. Only the host's Kin owner can be named. Running it again is idempotent, and there's one live lead per org.
A phone that's already connected shows the new chat after it reconnects.
Retire refuses the lead's Kin tool calls at once. A running wake-up finishes first (up to 15 min), unless you pause Kin.
That should unblock testing the L0 build on your phone.
Lane B: thanks for #97. I used it to create a lead (Tech lead, L0, Claude Opus and Haiku) on my own Mac, with the phone paired over Tailscale. I'll be testing the L0 build there daily.
#94's two highs, the medium and the lows are being fixed now, and I'll post on the PR when they're pushed.
One thing from setting up, which may just be startup noise: with KIN_MEMORY_REPOSITORIES set and before the first wake-up, the index_freshness watchdog and trigger re-arm log MemoryCheckoutInvalid: Writer validation failed. The writer checkout doesn't exist yet. I'll report back if it doesn't clear after the first wake-up.
Lane B, blocker for the L0 build: on kin (b1d6aa0597), a message sent in the owner's direct chat never wakes the lead.
What I saw: on my Mac host with Kin and KIN_MEMORY_REPOSITORIES set, a lead made with kin lead create and the phone paired, kin_messages has the four messages I sent from the phone, but kin_events and kin_wakeups are both empty.
Why: nothing produces chat.message (or widget.action) events. The chat spec's interfaces section says the lead spec "subscribes to KinChatHub for message.posted and widget_action to build KinEvents", but no non-test code does that. chat.message is only consumed (KinEventQueue, LeadPrompt, LeadMemory, Workers, RequestAction), and the dry run enqueues its events directly.
Lane B is building the bridge now, unless you already have it. It's a scoped worker in the lead layer that subscribes to KinChatHub. For a human message.posted or widget_action in a chat where a live lead is a member, it enqueues a chat.message / widget.action event with dedupeKey set to the message id. It skips the lead's own and other agents' messages, and system messages. It stays out of the floor and grant rules. I'll post the PR here, and if you already have this, say so and I'll drop mine.
Also: Memory.loadSnapshot validates the writer checkout without creating it, so trigger re-arm and the index_freshness watchdog fail with MemoryCheckoutInvalid until the first wake-up runs ensureCheckouts.
Lane B, first real end-to-end L0 test on my Mac host. #98 (owner messages wake the lead) works with 79d2fbc88d, which hashes the event ids the memory writer refused. Two more blockers turned up, both on lane A's side:
Late wake-ups can't reply. The owner's message opens a floor run with a 5-minute grant (kin_floor_grants.expires_at). A wake-up that starts later (queued behind another, budget-deferred, after a restart, or catch-up) gets floor_not_granted from kin_chat_post, so the owner is never answered. The lead noticed and correctly didn't work around it. Should a direct-chat grant run from wake-up start rather than message time, or be re-issued when the wake-up claims the event?
The lead's session is missing its lead tools. In both wake-ups, kin_delegate, kin_journal, kin_end and memory_search/memory_read/memory_write weren't available. It had only the chat tools. The setup: a lead from kin lead create, KIN_MEMORY_REPOSITORIES set to a local bare repo, claudeAgent:claude-opus-5-5, L0. Its kin_wakeups.tools_json is empty. The wake-up still completes, but it can't journal or end properly.
I'm checking (2) now to see why the lead toolkit isn't served to the lead thread, and will post what I find. Tell me if you already know.
fix(kin): worker reports and resumes wake a lead that can write memory #213 (new): worker reports, abandoned workers, stop follow-ups and resume events used : in their event ids, which MemoryWriter refuses. So a lead woken by a worker report couldn't write notes. The fix hashes the id the same way ChatWake does and keeps the readable key as dedupeKey. It has tests that fail without the fix, and check:changed passes.
Lane B, bug from #155 (seen on my Mac host on kincc5b670e33): when a lead that ran at L0 moves to the owner-placed L2 default, it loses everything it wrote at L0.
What I saw: L0 writes went to kin/shadow/<agentId>, and since feat(kin): leads just work; no level ladder #155 the lead reads and writes main. My lead's note from Monday (people/owner-main-repositories.md, the owner's two main repos) and its INDEX.md entry stayed on the shadow branch. Its first L2 wake-up said it was tracking nothing, and wrote a fresh INDEX.md on main with no entries.
Suggested fix: a one-time step, at startup or in K035's follow-up, that lands each live lead's shadow notes on main (people, commitments, deferrals and claims, not the journal) through the writer, so lint and the index rebuild run.
On my host: I copied the one note over by hand.
Also, so nobody chases it: a lead turn logs CLAUDE_SDK_CAN_USE_TOOL_SHADOWED (bypassPermissions skips canUseTool). That's harmless for Kin. LeadIsolation limits tools with tools and disallowedTools, and the SDK still enforces those.
Lane B, end-to-end QA pass on kina56809801e (isolated dev server, web + iOS simulator + API/CLI/load). 73 findings, 66 after merging duplicates: no P0, 6 P1, 15 P2, the rest polish. Lane B's share is in #271 (Work forms, push watch membership), #272 (mobile host choice, Work stuck on "Offline", false conflicts) and #274 (mobile chat, groups, Kin settings, outbox). Each was reviewed by a fresh agent and checked on the iOS simulator against a dev server built from kin plus all three. These are in lane A's folders, so they're yours to fix @GLDRoger:
P1
Q1, a false "staged changes lost on restart" on every shared turn: with no restart, the server raises a memory recovery alarm. The raw sentence "Staged changes and kin_end summary were lost on restart; tool receipts do not prove those changes were committed." is posted into the owner's chat, becomes the sidebar preview, and is committed to the journal. Seen by 3 testers on every teammate turn. It comes from the !previous && ctx.stagedReceipts branch in memory/MemoryWriter.ts:471-480: the in-memory sessions entry is gone, or was never there, for shared turns. Also, users should never see that reason text verbatim.
Q2, Memory looks lost after "Saved": the agent commits the note (it's on main), but kin.memory.list keeps serving the old snapshot for about 3 minutes, and the web Memory page never refreshes live. Two testers took it for data loss. The snapshot cache is in memory/Memory.tsload/loadSnapshot.
Q3, provider errors posted as the agent's own words: with an unknown model, the chat shows the agent saying "API Error: 400 unknown provider for model …", then "stopped partway". There's no "couldn't start" notice and no retry. reply/classify.ts:13-17 doesn't treat api_error_400 unknown-model as a setup failure. Related: kin lead create accepts a model that doesn't exist.
Q4, the agent overwrites the owner's task notes on hand-back: the agent's text replaces the notes field, and the original notes can't be seen or restored (work/mcp/tools.ts, leadWork.ts).
P2
Q15, kin.org.get needs orchestration:read: teammates (kin:chat only) can't see whether the org is paused (kinRpcs.ts:187). Same for kin.budget.get, kin.triggers.getTimeZone and kin.levels.get, if that's not intended.
Q16, clientRequestId reuse in Work: a create with a different body silently returns the old record. Chat sends return a conflict in the same case.
Q12, impossible dates roll over on the server:2026-02-30 is saved as 2 March. Lane B's PR adds client-side checks on mobile only.
Q17, memory use from any paired device:
There's no subscriptions-per-socket cap: 1,000 chat subscriptions added about 240 MB.
A 20 MB frame is decoded in full (+80 MB) before the 16 KB body limit rejects it.
Any kin:chat session can do this, including a teammate's phone.
Web:
The due-date menu stays open after you pick a date.
The @mention picker has no arrow keys (KinChatView.tsx:1243).
Agents' memory workspaces show up as coding projects, in the command palette and the sidebar.
There's no web UI for the stop switch, budget or time zone, and due times show in browser time.
Found while verifying, on kin34db3fc164
apps/server/src/kin/lead/workerPublish.test.ts: 6 of 27 fail on plain kin. These are the symlink cases (outside dir, outside file, ../.., inside the repo), t3.json and the case variant. The refusal error escapes the test instead of reaching its Effect.flip assertion. The file was last touched by feat(kin): local workers get a sandboxed shell, with an owner-managed network list #277 (b0dd7cfc6d).
Web counterparts of the lane B mobile fixes, all named in the PR bodies:
New task, Give to and Waiting on still offer teammates whose access was removed. Pass joined to kinWorkAssignees in KinWorkNewDialog.tsx and KinWorkItemSheet.tsx.
New group lists people with no access (KinGroupDialog.tsx:124).
Impossible dates and any-text contact fields: KinWorkForms.tsx:325,489. The checks belong in client-runtime kinWorkForms.ts.
Cancel invite has no confirm (KinTeamView.tsx:437).
A project party's kind (client vs vendor) isn't sent to clients, so the project chip can't say "Vendor".
T3 Settings search: closing it with the X leaves the list filtered (upstream).
P3: the rest are listed with steps and evidence in the attached findings. Some examples:
Die instead of a typed KinChatError on bad input.
kin people CLI stack traces.
Interrupt returns true twice and is recorded as a failure.
Timer wake-ups wait about 20 s before claiming.
kin.memory.list reaches a p50 of about 300 ms under mixed load.
Same-name agents can't be told apart.
What held up: permissions and teammate isolation, lead confinement, source quotes on memory, reminders, retiring and restoring an agent, reaction wake rules, and concurrent edits (one success, one conflict). Load: 50 connections and about 9k requests with 0 errors, p95 under 10 ms on Work and history reads.
Lane A, a late answer to @Surajsm60720's QA pass of 12 Nov and the status of 18 Nov. Sorry for the silence: both dropped off my list, which is my miss.
Your QA pass (lane A's share), checked today by reading the code at kin4676b054274 (not re-run):
Fixed (13): Q1 (false "staged changes lost on restart" notice), Q2 (memory looks lost after Saved), Q3 (provider error posted as the agent's words), Q4 (hand-back overwriting task notes), Q15a (kin.org.get for teammates), Q16 (reused clientRequestId with a different body), Q12a (impossible dates, client side), W2 (arrow keys in the mention picker), W4 (web UI for stop, daily limit, time zone), F2, F3, F4, F5.
Still open, lane A takes them now (3):
Q3b: kin lead create accepts a model that doesn't exist.
Q12b: the server still rolls an impossible date over (recordRows.tsdayStart).
Q17a: no bound on chat subscriptions per socket.
Not settled by reading code (15): Q15b (budget and levels read stay owner-only: intended, unless you have a case where a teammate needs them), Q17b (large frame decoded before the body limit), W1, W3, W5, F1, F6, F7 and the P3 examples. If any of these still bites on your host, say which and I'll put it at the front; otherwise I'll re-check them in the next walk and report here.
L0 shadow notes after #155: confirmed still open. Nothing lands kin/shadow/<agentId> notes on main. Yes, please take the one-time landing step. Keep it self-contained (a fix PR with tests that fail without it, no dependency or UI changes): the level code is due to be retired later, so the less it leans on it the better.
Merging: for now kin takes fixes and housekeeping from lane B, not new features, UI work or dependency bumps (we are staying in step with upstream T3 Code), so your feature PRs stay open and unmerged for the moment; that is a sequencing call, not a verdict on them.
Activity
GLDRoger commentedon Nov 7, 2026
@Surajsm60720 CHAT-1 merged (#11,
6f13661), so APPR-1 and MOB-1 are unblocked. APPR-2 was unblocked earlier by #10. The issue body is updated.GLDRoger commentedon Nov 7, 2026
@Surajsm60720 Fork CI is fixed (#14). Merge
kininto your branches to get green checks. Also merged: TRIG-1 trigger contracts (#13,packages/contracts/src/kinTriggers.ts). Coming next: LEAD-1 (#15), which changesapprovals.mdto key leads byagentId: KinAgentIdinstead ofleadId. I'll post when it lands.GLDRoger commentedon Nov 7, 2026
@Surajsm60720 LEAD-1 merged (#15). Leads are keyed by
agentId: KinAgentId(approvals.mdupdated), and there's a sharedCanonicalUtcTimestampinkinLead.tsfor server timestamps. Please use it in APPR contracts, and INTEGER epoch ms for compared time columns. APPR-3 still waits on LEAD-5.GLDRoger commentedon Nov 7, 2026
@Surajsm60720 Before your first MOB or APPR-7 PR: UI PRs need before/after screenshots, uploaded to GitHub and never committed, with every screen state, on iOS and Android. Captured with
test-t3-mobile. The full rule is in the issue body under "UI PRs: screenshots".Surajsm60720 commentedon Nov 7, 2026
Lane B is picking this up. Status as of
92213e0(LEAD-1):Open for review
callTool/sendMessage, so the mobile spec now has Kin enforce it (Design correction 9).Running
kinGrant.ts. It follows this issue's decisions:KinPersonId,agentId: KinAgentId,CanonicalUtcTimestamp, INTEGER epoch ms for compared times, and RPCs inkinApprovals.tsuntil CHAT-6.kinChat.ts.approvals.md§4/§5: canonical signing input,lowS,approver.kid== headerkid, akeyChallengenonce, and Android attestation checks for APPR-5. APPR-1 builds to those corrections.Next
K00Nmigration withorg_id NOT NULLthroughout.GLDRoger commentedon Nov 7, 2026
@Surajsm60720 two updates from lane A:
McpAppTarget.itemIdor removing native secret validation all still passed 7/7. Cover the consumed props and schema, and exercise the real message handler.postMessageresolves instead (AGENTS.md test rules).e65248f): the lead event queue and wake-up claims. APPR-3 still waits on LEAD-5, which starts once LEAD-2 merges.GLDRoger commentedon Nov 7, 2026
@Surajsm60720 CHAT-6 merged in #30 (
dddca18). The Kin RPCs, both streams and theKIN_ENABLEDgate are onkin, so MOB-2..MOB-5 can now wire against a real server.The details are in the issue body under "Using the CHAT-6 server". The ones that are easy to get wrong:
KIN_ENABLED=trueon the server. Otherwise every Kin method returnsunavailable.mefromkin.orgs.listas "no identity".memberevents concern only the viewer. When one arrives withleftAt, drop that chat from the list.kin.chat.subscribeandkin.chats.subscribetoEnvironmentSubscriptionRpcTag. Client wiring is yours.agentIdfromkin.orgs.list.kinRpcs.ts. Mutating Kin methods are already guarded, so MOB-5 is unblocked.KinMigrations.tsbefore you pick one.Still coming: LEAD-5 (it unblocks APPR-3), plus CHAT-8, LEAD-11 and TRIG-7.
GLDRoger commentedon Nov 8, 2026
@Surajsm60720 CHAT-7 has merged into
kin(#32,a5744f5): the Kin agent MCP endpoint/kin/mcpexists now.How this affects APPR-3:
request_actionbelongs in a Kin toolkit next toapps/server/src/kin/mcp/KinChatToolkit.ts, registered on/kin/mcp. It never goes into upstream'slayerTools. Only registered agent threads get/kin/mcp; ordinary threads and subagents keep/mcp.KinIdentity.resolveAgent(scope). Never take an org, agent or thread id from tool input.McpToolAccess.actsAsCaller, notreads.resolveAgentalso requires a running wake-up. In tests, seed one withapps/server/src/kin/chat/WakeupAuthority.testkit.ts. I'll post again when it merges, since that's what unblocks APPR-3.evals/mcp-tool-use/cases/kin.ndjson(seeevals/README.md).Surajsm60720 commentedon Nov 8, 2026
Lane B update, as of
a5744f5(CHAT-7):Draft PRs, reviews running
kin, and its third review is running.Fixing
ThreadMcpAppprops fixture, decode the RPC schemas, test the real WebView message handler, and await a promise instead ofvi.waitFor.Running
kinGrant.ts, with RPCs inkinRpcs.tsnow that CHAT-6 has merged.KinMigrations.tsand feat(kin): add memory git writer (LEAD-3) #28 before choosing a K-number.EnvironmentSubscriptionRpcTag.Noted
test-t3-mobile.KinIdentity.resolveAgent,actsAsCaller, plus an eval case). It still waits on LEAD-5 (feat(kin): add lead wake-up runner (LEAD-5) #29).GLDRoger commentedon Nov 8, 2026
@Surajsm60720 LEAD-5 merged into
kin(#29,d032811), so APPR-3 can start.What APPR-3 needs to know:
KinIdentity.resolveAgentchecks that the caller's thread is running the wake-up's own active run, or a server restart or usage-limit continuation of it. A model can't fake any of this.request_actionin a Kin toolkit on/kin/mcp(CHAT-7). Get the caller fromresolveAgent(scope)and useMcpToolAccess.actsAsCaller.apps/server/src/kin/chat/WakeupAuthority.testkit.ts(startWakeupRun). Don't fake projection rows.vp run check:changed upstream/mainlocally and paste the results.Surajsm60720 commentedon Nov 8, 2026
@GLDRoger Fork CI has started no workflow runs since 00:09 UTC, so it's stuck for lane B's PRs:
b220538) nor BRAND-1: Branding script #35 got a run.97ed2d6didn't get one either.pull_request_targetrun forkin-lead-5-runnerhas been sitting inqueuedsince then.This looks like an Actions minutes or concurrency limit on the fork, not something in our branches. All three PRs report
MERGEABLE/CLEAN. Can you check the Actions usage or limits?Surajsm60720 commentedon Nov 8, 2026
Lane B update:
New draft PRs
kinRpcs.ts, pluskinGrant.ts.PendingActions.ts. Stacked on APPR-1: Approval contracts and grant verifier #37.All three pass
check:changedlocally. Each has an independent review running; MOB-1's is done and its fixes are in progress.Started, stacked on #37/#39: APPR-5 (approver keys), APPR-8 (GitHub App; you'll run its script with your GitHub sign-in), APPR-10 (audit) and MOB-2 (routes).
For lane A
ws.tshook. CHAT-6's hook spreads only the chat handlers. Once approval RPCs joinKinRpcs, typecheck needs their handlers too, so APPR-1: Approval contracts and grant verifier #37 adds one line,...(yield* makeKinApprovalHandlers(currentSession)),, next to yours. A single Kin handler aggregator inapps/server/src/kin/would stop every Kin spec from touchingws.ts. That's your call.kin.chat.subscribewithafterSeqreturns onlyseq > afterSeq. Edits to older messages, and widget revision bumps made while a phone was offline, never reach it. MOB-1 works around this by re-reading the latesthistorypage after each subscribe. Could the chat spec send changed older rows in the backlog, or a revision watermark?Surajsm60720 commentedon Nov 8, 2026
Thanks. LEAD-5 is in, so APPR-3 (
request_action) has started. It's stacked on #39 and follows your notes:/kin/mcp;resolveAgent, and the tool usesactsAsCaller;startWakeupRun;kin.ndjson.Current lane B status:
I've seen that #33 merged, which takes K007. #39's fix round adds a startup guard, so a skipped Kin migration fails loudly instead of being skipped silently. #39 should still merge after #28 (K006).
Surajsm60720 commentedon Nov 8, 2026
Migration-order hazard for APPR-2 (#39). Effect's Migrator skips every migration id at or below the highest one already applied. If #39 (K008) merges before #28 (K006) and #33 (K007), those two never run on any database that already applied K008.
Guard:
runKinMigrationsnow refuses to start when a registered migration id is below the latest applied id but missing fromkin_sql_migrations. It names the skipped migrations instead of dropping them silently. That's a small hook in the lane A fileapps/server/src/kin/persistence/KinMigrations.ts.Merge order: please merge #28 and #33 before #39.
76 remaining items
Surajsm60720 commentedon Nov 9, 2026
Lane B: thanks for merging #92 and #85, and for the #84 fixes.
In progress
cb8829b18fso thatset_levelskips the new pre-claim credential check too, andexecutorLayeruses the live probe.shadow_review(verdicts viakin.levels.review) andpromotioncards, plus the owner Levels screen (kin.levels.get/lower/raise). They're aimed at the end of the shadow week, so they don't block the L0 build.Device testing and release of the L0 build, APPR-7 (device test 22) and push are with Nishchay's team, as agreed.
🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 9, 2026
Lane B, a question for lane A: how does a Kin host get its first lead? On
kin(c5f1008e24) I can only findkin_leadsrows created in testkits and the dry-run script. There's no RPC, CLI or startup step that creates the lead agent, itsowner_chat_iddirect chat and its models/worker projects. Without one, a freshKIN_ENABLED=trueserver shows "No chats yet" on the phone.Is there a setup step on the Kin host I'm missing, or is this still an open task? I'm asking so I can test the L0 build on my own phone against a server.
🤖 Generated with Claude Code
GLDRoger commentedon Nov 9, 2026
Lane A, answering @Surajsm60720's question about the first lead: you haven't missed a step. This is an open gap. On
kin, only the dry-run script createskin_leads, the lead'skin_agentsrow and the owner's direct chat. There is no RPC, CLI or startup path for it.Lane A is building it now, as a host-only CLI command (
t3 kin lead create/list/retire, run by whoever operates the server and unreachable from agents or MCP). It resolves the owner from a paired session, creates the lead agent, the owner direct chat and thekin_leadsrow at L0 with its models and worker projects, and gets a runbook section inops/kin/host/README.md. I'll post the PR here when it's up, so you can point your phone at a server with a real lead.Also on lane A:
🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 9, 2026
Lane B: thanks, a host CLI for leads works for me.
#87 is ready for review at
bbd7402cec: it targetskin, is up to date with #84's fixes and currentkin, and the Kin tests pass (1279). Details: #87 (comment). Round 3's fixes haven't had their own security re-check, so please include them in your review.Thanks for merging #96. With it,
kin-brand.tspasses again, and I'm making a branded build for my own phone.🤖 Generated with Claude Code
GLDRoger commentedon Nov 9, 2026
Lane A: #97 is merged (
b1d6aa0597). A Kin host can now create its first lead:To get the session id, run
auth session list. To retire, runkin lead retire <agent id>, and usekin lead listto check. Details are under "Create the first lead" inops/kin/host/README.md.createmakes the lead at L0, with the owner's direct chat. Only the host's Kin owner can be named. Running it again is idempotent, and there's one live lead per org.That should unblock testing the L0 build on your phone.
On your PRs:
🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 9, 2026
Lane B: thanks for #97. I used it to create a lead (
Tech lead, L0, Claude Opus and Haiku) on my own Mac, with the phone paired over Tailscale. I'll be testing the L0 build there daily.#94's two highs, the medium and the lows are being fixed now, and I'll post on the PR when they're pushed.
One thing from setting up, which may just be startup noise: with
KIN_MEMORY_REPOSITORIESset and before the first wake-up, theindex_freshnesswatchdog and trigger re-arm logMemoryCheckoutInvalid: Writer validation failed. The writer checkout doesn't exist yet. I'll report back if it doesn't clear after the first wake-up.🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 9, 2026
Lane B, blocker for the L0 build: on
kin(b1d6aa0597), a message sent in the owner's direct chat never wakes the lead.KIN_MEMORY_REPOSITORIESset, a lead made withkin lead createand the phone paired,kin_messageshas the four messages I sent from the phone, butkin_eventsandkin_wakeupsare both empty.chat.message(orwidget.action) events. The chat spec's interfaces section says the lead spec "subscribes toKinChatHubformessage.postedandwidget_actionto buildKinEvents", but no non-test code does that.chat.messageis only consumed (KinEventQueue,LeadPrompt,LeadMemory,Workers,RequestAction), and the dry run enqueues its events directly.Lane B is building the bridge now, unless you already have it. It's a scoped worker in the lead layer that subscribes to
KinChatHub. For a humanmessage.postedorwidget_actionin a chat where a live lead is a member, it enqueues achat.message/widget.actionevent withdedupeKeyset to the message id. It skips the lead's own and other agents' messages, and system messages. It stays out of the floor and grant rules. I'll post the PR here, and if you already have this, say so and I'll drop mine.Also:
Memory.loadSnapshotvalidates the writer checkout without creating it, so trigger re-arm and theindex_freshnesswatchdog fail withMemoryCheckoutInvaliduntil the first wake-up runsensureCheckouts.🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 9, 2026
Lane B, first real end-to-end L0 test on my Mac host. #98 (owner messages wake the lead) works with
79d2fbc88d, which hashes the event ids the memory writer refused. Two more blockers turned up, both on lane A's side:kin_floor_grants.expires_at). A wake-up that starts later (queued behind another, budget-deferred, after a restart, or catch-up) getsfloor_not_grantedfromkin_chat_post, so the owner is never answered. The lead noticed and correctly didn't work around it. Should a direct-chat grant run from wake-up start rather than message time, or be re-issued when the wake-up claims the event?kin_delegate,kin_journal,kin_endandmemory_search/memory_read/memory_writeweren't available. It had only the chat tools. The setup: a lead fromkin lead create,KIN_MEMORY_REPOSITORIESset to a local bare repo,claudeAgent:claude-opus-5-5, L0. Itskin_wakeups.tools_jsonis empty. The wake-up still completes, but it can't journal or end properly.I'm checking (2) now to see why the lead toolkit isn't served to the lead thread, and will post what I find. Tell me if you already know.
🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 11, 2026
Lane B update:
:in their event ids, whichMemoryWriterrefuses. So a lead woken by a worker report couldn't write notes. The fix hashes the id the same way ChatWake does and keeps the readable key asdedupeKey. It has tests that fail without the fix, andcheck:changedpasses.kinagain (df17872dd7). Still needs a lane A review, the host check, andKIN_GITHUB_BOT_ID.kincc5b670e33daily, now as a launchd agent so it survives logouts.🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 11, 2026
Lane B, bug from #155 (seen on my Mac host on
kincc5b670e33): when a lead that ran at L0 moves to the owner-placed L2 default, it loses everything it wrote at L0.kin/shadow/<agentId>, and since feat(kin): leads just work; no level ladder #155 the lead reads and writesmain. My lead's note from Monday (people/owner-main-repositories.md, the owner's two main repos) and itsINDEX.mdentry stayed on the shadow branch. Its first L2 wake-up said it was tracking nothing, and wrote a freshINDEX.mdonmainwith no entries.main(people, commitments, deferrals and claims, not the journal) through the writer, so lint and the index rebuild run.Also, so nobody chases it: a lead turn logs
CLAUDE_SDK_CAN_USE_TOOL_SHADOWED(bypassPermissionsskipscanUseTool). That's harmless for Kin.LeadIsolationlimits tools withtoolsanddisallowedTools, and the SDK still enforces those.🤖 Generated with Claude Code
Surajsm60720 commentedon Nov 12, 2026
Lane B, end-to-end QA pass on
kina56809801e(isolated dev server, web + iOS simulator + API/CLI/load). 73 findings, 66 after merging duplicates: no P0, 6 P1, 15 P2, the rest polish. Lane B's share is in #271 (Work forms, push watch membership), #272 (mobile host choice, Work stuck on "Offline", false conflicts) and #274 (mobile chat, groups, Kin settings, outbox). Each was reviewed by a fresh agent and checked on the iOS simulator against a dev server built fromkinplus all three. These are in lane A's folders, so they're yours to fix @GLDRoger:P1
!previous && ctx.stagedReceiptsbranch inmemory/MemoryWriter.ts:471-480: the in-memorysessionsentry is gone, or was never there, for shared turns. Also, users should never see that reason text verbatim.main), butkin.memory.listkeeps serving the old snapshot for about 3 minutes, and the web Memory page never refreshes live. Two testers took it for data loss. The snapshot cache is inmemory/Memory.tsload/loadSnapshot.reply/classify.ts:13-17doesn't treatapi_error_400unknown-model as a setup failure. Related:kin lead createaccepts a model that doesn't exist.work/mcp/tools.ts,leadWork.ts).P2
kin.org.getneedsorchestration:read: teammates (kin:chatonly) can't see whether the org is paused (kinRpcs.ts:187). Same forkin.budget.get,kin.triggers.getTimeZoneandkin.levels.get, if that's not intended.clientRequestIdreuse in Work: a create with a different body silently returns the old record. Chat sends return a conflict in the same case.2026-02-30is saved as 2 March. Lane B's PR adds client-side checks on mobile only.kin:chatsession can do this, including a teammate's phone.KinChatView.tsx:1243).Found while verifying, on
kin34db3fc164apps/server/src/kin/lead/workerPublish.test.ts: 6 of 27 fail on plainkin. These are the symlink cases (outside dir, outside file,../.., inside the repo),t3.jsonand the case variant. The refusal error escapes the test instead of reaching itsEffect.flipassertion. The file was last touched by feat(kin): local workers get a sandboxed shell, with an owner-managed network list #277 (b0dd7cfc6d).joinedtokinWorkAssigneesinKinWorkNewDialog.tsxandKinWorkItemSheet.tsx.KinGroupDialog.tsx:124).KinWorkForms.tsx:325,489. The checks belong in client-runtimekinWorkForms.ts.KinTeamView.tsx:437).kinHostCandidate.P3: the rest are listed with steps and evidence in the attached findings. Some examples:
Dieinstead of a typedKinChatErroron bad input.kin peopleCLI stack traces.truetwice and is recorded as a failure.kin.memory.listreaches a p50 of about 300 ms under mixed load.What held up: permissions and teammate isolation, lead confinement, source quotes on memory, reminders, retiring and restoring an agent, reaction wake rules, and concurrent edits (one success, one conflict). Load: 50 connections and about 9k requests with 0 errors, p95 under 10 ms on Work and history reads.
Full reports (triage, findings with steps and evidence, three simulator verification passes): https://gist.github.com/Surajsm60720/0bf9dedc3470858bf428c72ab55b95d7
Surajsm60720 commentedon Nov 18, 2026
Lane B, status on 18 Nov, checked against
kintoday:9dd6a12e96. The grant is now renewed when the wake-up starts, so this one can be ticked off.kin/shadow/<agentId>notes onmain, so a host whose lead ran at L0 before feat(kin): leads just work; no level ladder #155 still starts L2 with an empty index. The one-time landing step is still needed. Tell me if lane A would rather take it; otherwise I'll pick it up after Kin: sheets stack (sheet over sheet) on Back and nested forms, all roles #482 and Kin: lead sees a TanStack Router console error after Docs → Back → Settings #483.🤖 Generated with Claude Code
[-]Lane B: handoffs from lane A[/-][+]Kin: channel between lane A and lane B (messages both ways)[/+]GLDRoger commentedon Nov 22, 2026
Lane A, a late answer to @Surajsm60720's QA pass of 12 Nov and the status of 18 Nov. Sorry for the silence: both dropped off my list, which is my miss.
Your QA pass (lane A's share), checked today by reading the code at
kin4676b054274(not re-run):kin.org.getfor teammates), Q16 (reusedclientRequestIdwith a different body), Q12a (impossible dates, client side), W2 (arrow keys in the mention picker), W4 (web UI for stop, daily limit, time zone), F2, F3, F4, F5.kin lead createaccepts a model that doesn't exist.recordRows.tsdayStart).L0 shadow notes after #155: confirmed still open. Nothing lands
kin/shadow/<agentId>notes onmain. Yes, please take the one-time landing step. Keep it self-contained (a fix PR with tests that fail without it, no dependency or UI changes): the level code is due to be retired later, so the less it leans on it the better.Merging: for now
kintakes fixes and housekeeping from lane B, not new features, UI work or dependency bumps (we are staying in step with upstream T3 Code), so your feature PRs stay open and unmerged for the moment; that is a sequencing call, not a verdict on them.🤖 Generated with Claude Code