Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
fix(daemon): require reading before alignment retry
Gusd4dd688a90b6
diff --git a/src/daemon/src/cli/index.test.ts b/src/daemon/src/cli/index.test.tsindex 0b29b544c..204ce61df 100644--- a/src/daemon/src/cli/index.test.ts+++ b/src/daemon/src/cli/index.test.ts@@ -182,7 +182,7 @@ describe("envelope contract", () => {});describe("channel alignment (message send)", () => {- it("blocked send becomes a readable error telling the agent to pull", async () => {+ it("blocked send requires reading new messages before deciding whether to resend", async () => {setApiForTesting(stubApi({ send: async () => ({ state: "blocked", reason: "unaligned", unreadCount: 3, latestSeq: 12 }) }),);@@ -193,6 +193,9 @@ describe("channel alignment (message send)", () => {expect(env.error).toContain("3 unread");expect(env.error).toContain("#12");expect(env.error).toContain("inbox pull");+ expect(env.error).toContain("READ the new messages");+ expect(env.error).toContain("before deciding");+ expect(env.error).toContain("resend, adjust, or skip");});});diff --git a/src/daemon/src/cli/index.ts b/src/daemon/src/cli/index.tsindex 1e279e3c2..c85cdcd48 100755--- a/src/daemon/src/cli/index.ts+++ b/src/daemon/src/cli/index.ts@@ -296,7 +296,8 @@ async function cmdMessageSend(opts: Record<string, unknown>): Promise<unknown> {if (res.state === "blocked") {throw new CliError(`channel not aligned: ${res.unreadCount} unread message(s) in ${channel} (latest #${res.latestSeq}). ` +- `Run \`alook inbox pull\` to align, then resend.`,+ `Run \`alook inbox pull\` and READ the new messages before deciding whether to resend, ` ++ `adjust, or skip your message.`,);}// `deduped` (a same-nonce retry matched the already-committed message) is a