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:
@@ -44,8 +44,7 @@ export const sessionInitHandler: EventHandler = {
|
||||
return { continue: true, suppressOutput: true, exitCode: HOOK_EXIT_CODES.SUCCESS };
|
||||
}
|
||||
|
||||
const { sessionId, prompt: rawPrompt } = input;
|
||||
const cwd = input.cwd ?? process.cwd(); // Match context.ts fallback (#1918)
|
||||
const { sessionId, cwd, prompt: rawPrompt } = input;
|
||||
|
||||
// Guard: Codex CLI and other platforms may not provide a session_id (#744)
|
||||
if (!sessionId) {
|
||||
@@ -70,23 +69,16 @@ export const sessionInitHandler: EventHandler = {
|
||||
logger.debug('HOOK', 'session-init: Calling /api/sessions/init', { contentSessionId: sessionId, project });
|
||||
|
||||
// Initialize session via HTTP - handles DB operations and privacy checks
|
||||
let initResponse: Response;
|
||||
try {
|
||||
initResponse = await workerHttpRequest('/api/sessions/init', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
contentSessionId: sessionId,
|
||||
project,
|
||||
prompt,
|
||||
platformSource
|
||||
})
|
||||
});
|
||||
} catch (err) {
|
||||
// Worker unreachable — on Linux/WSL, hook may fire before worker is healthy (#1907)
|
||||
logger.warn('HOOK', `session-init: worker request failed: ${err instanceof Error ? err.message : err}`);
|
||||
return { continue: true, suppressOutput: true, exitCode: HOOK_EXIT_CODES.SUCCESS };
|
||||
}
|
||||
const initResponse = await workerHttpRequest('/api/sessions/init', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
contentSessionId: sessionId,
|
||||
project,
|
||||
prompt,
|
||||
platformSource
|
||||
})
|
||||
});
|
||||
|
||||
if (!initResponse.ok) {
|
||||
// Log but don't throw - a worker 500 should not block the user's prompt
|
||||
|
||||
Reference in New Issue
Block a user