fix: use _meta instead of meta in newSession request (#8796)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Toohey 2026-04-24 22:49:49 +12:00 committed by GitHub
parent f82dbc4c8a
commit f827af6295
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,9 +190,7 @@ export async function newSession(
): Promise<NewSessionResponse> {
const tClient = performance.now();
const client = await getClient();
const request: Parameters<typeof client.newSession>[0] & {
meta?: Record<string, string>;
} = {
const request: Parameters<typeof client.newSession>[0] = {
cwd: workingDir,
mcpServers: [],
};
@ -201,7 +199,7 @@ export async function newSession(
if (providerId) meta.provider = providerId;
if (projectId) meta.projectId = projectId;
if (personaId) meta.personaId = personaId;
if (Object.keys(meta).length > 0) request.meta = meta;
if (Object.keys(meta).length > 0) request._meta = meta;
const tCall = performance.now();
const response = await client.newSession(request);