revert: roll back v12.3.3 (Issue Blowout 2026)

SessionStart context injection regressed in v12.3.3 — no memory
context is being delivered to new sessions. Rolling back to the
v12.3.2 tree state while the regression is investigated.

Reverts #2080.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-04-20 11:59:15 -07:00
parent 708a258d39
commit bfc7de377a
45 changed files with 367 additions and 1249 deletions
+3 -34
View File
@@ -97,37 +97,6 @@ interface SessionDeletedEvent {
const WORKER_BASE_URL = "http://127.0.0.1:37777";
const MAX_TOOL_RESPONSE_LENGTH = 1000;
// ============================================================================
// Auth Token (reads from DATA_DIR/worker-auth-token)
// ============================================================================
import { readFileSync, existsSync } from "fs";
import { join } from "path";
import { homedir } from "os";
let cachedAuthToken: string | null = null;
function getAuthToken(): string | null {
if (cachedAuthToken) return cachedAuthToken;
const tokenPath = join(
process.env.CLAUDE_MEM_DATA_DIR || join(homedir(), ".claude-mem"),
"worker-auth-token",
);
if (!existsSync(tokenPath)) return null;
const token = readFileSync(tokenPath, "utf-8").trim();
if (token.length >= 32) {
cachedAuthToken = token;
return token;
}
return null;
}
function getAuthHeaders(): Record<string, string> {
const token = getAuthToken();
if (!token) return { "Content-Type": "application/json" };
return { "Content-Type": "application/json", Authorization: `Bearer ${token}` };
}
// ============================================================================
// Worker HTTP Client
// ============================================================================
@@ -140,7 +109,7 @@ async function workerPost(
try {
response = await fetch(`${WORKER_BASE_URL}${path}`, {
method: "POST",
headers: getAuthHeaders(),
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
});
} catch (error: unknown) {
@@ -165,7 +134,7 @@ function workerPostFireAndForget(
): void {
fetch(`${WORKER_BASE_URL}${path}`, {
method: "POST",
headers: getAuthHeaders(),
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
}).catch((error: unknown) => {
const message = error instanceof Error ? error.message : String(error);
@@ -177,7 +146,7 @@ function workerPostFireAndForget(
async function workerGetText(path: string): Promise<string | null> {
try {
const response = await fetch(`${WORKER_BASE_URL}${path}`, { headers: getAuthHeaders() });
const response = await fetch(`${WORKER_BASE_URL}${path}`);
if (!response.ok) {
console.warn(`[claude-mem] Worker GET ${path} returned ${response.status}`);
return null;