fix(subagent-codex): drop unused initialize metadata gate

This commit is contained in:
pku-xht
2026-08-05 04:45:11 +08:00
parent a49ef7581f
commit 075b6b0756
2 changed files with 3 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ export class CodexAppServerWire {
* @param signal - unpublished-start cancellation.
*/
async initialize(signal: AbortSignal): Promise<void> {
const response = object(await this.guarded(this.transport.request('initialize', {
object(await this.guarded(this.transport.request('initialize', {
clientInfo: {
name: 'deepseek-harness',
title: 'DeepSeek Harness',
@@ -141,7 +141,6 @@ export class CodexAppServerWire {
requestAttestation: false,
},
}, signal), signal), 'initialize response')
string(response.userAgent, 'initialize userAgent')
this.transport.notify('initialized')
await this.guarded(this.transport.flush(), signal)
}

View File

@@ -934,8 +934,8 @@ describe('run lifecycle and quiescence', () => {
const child = fakeChild()
const starting = startCodexRun(request(), runSpec(child))
const initialize = await child.peer.nextMethod('initialize')
child.peer.respond(initialize, { userAgent: '' })
await expect(starting).rejects.toThrow('initialize userAgent')
child.peer.respond(initialize, null)
await expect(starting).rejects.toThrow('invalid initialize response')
expect(child.terminate).toHaveBeenCalledTimes(1)
})