We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentd4f208b commit7e5ede0Copy full SHA for 7e5ede0
agent/agentcontainers/api.go
@@ -1100,15 +1100,13 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1100
directory=DevcontainerDefaultContainerWorkspaceFolder
1101
}
1102
1103
-ifproc.agent.ID!=uuid.Nil {
1104
-ifrecreateSubAgent {
1105
-logger.Debug(ctx,"deleting existing subagent for recreation",slog.F("agent_id",proc.agent.ID))
1106
-err=api.subAgentClient.Delete(ctx,proc.agent.ID)
1107
-iferr!=nil {
1108
-returnxerrors.Errorf("delete existing subagent failed: %w",err)
1109
-}
1110
-proc.agent=SubAgent{}
+ifproc.agent.ID!=uuid.Nil&&recreateSubAgent {
+logger.Debug(ctx,"deleting existing subagent for recreation",slog.F("agent_id",proc.agent.ID))
+err=api.subAgentClient.Delete(ctx,proc.agent.ID)
+iferr!=nil {
+returnxerrors.Errorf("delete existing subagent failed: %w",err)
1111
+proc.agent=SubAgent{}
1112
1113
ifproc.agent.ID==uuid.Nil {
1114
displayAppsMap:=map[codersdk.DisplayApp]bool{