Run tasks on Codex beside Claude; drop turn caps and mid-turn snapshots

This commit is contained in:
Ian Gulliver
2026-10-15 14:55:58 -07:00
parent 17898b0191
commit 74707f6398
53 changed files with 1904 additions and 1295 deletions
+57
View File
@@ -10,9 +10,11 @@ const (
MethodInitialize = "initialize"
MethodThreadStart = "thread/start"
MethodThreadResume = "thread/resume"
MethodThreadFork = "thread/fork"
MethodThreadCompactStart = "thread/compact/start"
MethodThreadRead = "thread/read"
MethodTurnStart = "turn/start"
MethodTurnSteer = "turn/steer"
MethodTurnInterrupt = "turn/interrupt"
MethodError = "error"
MethodThreadStarted = "thread/started"
@@ -114,9 +116,11 @@ var clientResults = map[string]func() any{
MethodInitialize: func() any { return &InitializeResponse{} },
MethodThreadStart: func() any { return &ThreadStartResponse{} },
MethodThreadResume: func() any { return &ThreadResumeResponse{} },
MethodThreadFork: func() any { return &ThreadForkResponse{} },
MethodThreadCompactStart: func() any { return &ThreadCompactStartResponse{} },
MethodThreadRead: func() any { return &ThreadReadResponse{} },
MethodTurnStart: func() any { return &TurnStartResponse{} },
MethodTurnSteer: func() any { return &TurnSteerResponse{} },
MethodTurnInterrupt: func() any { return &TurnInterruptResponse{} },
}
@@ -1483,6 +1487,46 @@ type ThreadResumeResponse struct {
TurnsBackwardsCursor string `json:"turnsBackwardsCursor,omitempty"`
}
type ThreadForkParams struct {
ApprovalPolicy AskForApproval `json:"approvalPolicy,omitempty"`
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer,omitempty"`
BaseInstructions string `json:"baseInstructions,omitempty"`
BeforeTurnID string `json:"beforeTurnId,omitempty"`
Config map[string]any `json:"config,omitempty"`
Cwd string `json:"cwd,omitempty"`
DeferGoalContinuation bool `json:"deferGoalContinuation,omitempty"`
DeveloperInstructions string `json:"developerInstructions,omitempty"`
Ephemeral bool `json:"ephemeral,omitempty"`
ExcludeTurns bool `json:"excludeTurns,omitempty"`
LastTurnID string `json:"lastTurnId,omitempty"`
Model string `json:"model,omitempty"`
ModelProvider string `json:"modelProvider,omitempty"`
Path string `json:"path,omitempty"`
Permissions string `json:"permissions,omitempty"`
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
Sandbox SandboxMode `json:"sandbox,omitempty"`
ServiceTier string `json:"serviceTier,omitempty"`
ThreadID string `json:"threadId"`
ThreadSource ThreadSource `json:"threadSource,omitempty"`
}
type ThreadForkResponse struct {
ActivePermissionProfile *ActivePermissionProfile `json:"activePermissionProfile,omitempty"`
ApprovalPolicy AskForApproval `json:"approvalPolicy"`
ApprovalsReviewer ApprovalsReviewer `json:"approvalsReviewer"`
Cwd AbsolutePathBuf `json:"cwd"`
DisabledPluginIDs []string `json:"disabledPluginIds,omitempty"`
InstructionSources []LegacyAppPathString `json:"instructionSources,omitempty"`
Model string `json:"model"`
ModelProvider string `json:"modelProvider"`
MultiAgentMode MultiAgentMode `json:"multiAgentMode,omitempty"`
ReasoningEffort ReasoningEffort `json:"reasoningEffort,omitempty"`
RuntimeWorkspaceRoots []AbsolutePathBuf `json:"runtimeWorkspaceRoots,omitempty"`
Sandbox SandboxPolicy `json:"sandbox"`
ServiceTier string `json:"serviceTier,omitempty"`
Thread Thread `json:"thread"`
}
type ThreadCompactStartParams struct {
ThreadID string `json:"threadId"`
}
@@ -1547,6 +1591,19 @@ type TurnStartResponse struct {
Turn Turn `json:"turn"`
}
type TurnSteerParams struct {
AdditionalContext map[string]AdditionalContextEntry `json:"additionalContext,omitempty"`
ClientUserMessageID string `json:"clientUserMessageId,omitempty"`
ExpectedTurnID string `json:"expectedTurnId"`
Input []UserInput `json:"input"`
ResponsesapiClientMetadata map[string]string `json:"responsesapiClientMetadata,omitempty"`
ThreadID string `json:"threadId"`
}
type TurnSteerResponse struct {
TurnID string `json:"turnId"`
}
type TurnInterruptParams struct {
ThreadID string `json:"threadId"`
TurnID string `json:"turnId"`