Skip to content

Commit 081b68c

Browse files
committed
fix: preserve codex fork reasoning effort
1 parent 06e2fc5 commit 081b68c

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

hub/src/sync/sessionModel.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,9 @@ describe('session model', () => {
695695
},
696696
null,
697697
'default',
698-
'gpt-5.4'
698+
'gpt-5.4',
699+
undefined,
700+
'xhigh'
699701
)
700702
engine.getOrCreateMachine(
701703
'machine-1',
@@ -707,19 +709,21 @@ describe('session model', () => {
707709

708710
let capturedForkSessionId: string | undefined
709711
let capturedModel: string | undefined
712+
let capturedModelReasoningEffort: string | undefined
710713
;(engine as any).rpcGateway.spawnSession = async (
711714
_machineId: string,
712715
_directory: string,
713716
_agent: string,
714717
model?: string,
715-
_modelReasoningEffort?: string,
718+
modelReasoningEffort?: string,
716719
_yolo?: boolean,
717720
_sessionType?: 'simple' | 'worktree',
718721
_worktreeName?: string,
719722
_resumeSessionId?: string,
720723
forkSessionId?: string
721724
) => {
722725
capturedModel = model
726+
capturedModelReasoningEffort = modelReasoningEffort
723727
capturedForkSessionId = forkSessionId
724728
const forkedSession = engine.getOrCreateSession(
725729
'forked-session',
@@ -743,6 +747,7 @@ describe('session model', () => {
743747
expect(result.type).toBe('success')
744748
expect(capturedForkSessionId).toBe('codex-thread-1')
745749
expect(capturedModel).toBe('gpt-5.4')
750+
expect(capturedModelReasoningEffort).toBe('xhigh')
746751
} finally {
747752
engine.stop()
748753
}

hub/src/sync/syncEngine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ export class SyncEngine {
658658
metadata.path,
659659
'codex',
660660
session.model ?? undefined,
661-
undefined,
661+
session.modelReasoningEffort ?? undefined,
662662
undefined,
663663
undefined,
664664
undefined,

0 commit comments

Comments
 (0)