How to solve DDE with different constant lags

I am trying to solve the following delay differential equation using DifferentialEquations.jl.

\dot{y_1}(t) = y_1(t - 1)\\ \dot{y_2}(t) = y_1(t - 1) + y_2(t - 0.2)\\ \dot{y_3}(t) = y_2(t)

The history function for t \leq 0 is constant, y_1(t) = y_2(t) = y_3(t)=1.

Here is the script I wrote to solve the problem,

using DifferentialEquations 

lags = [1., 0.2]
out = zeros(3)
function h(out, p, t)
    out .= 1.
end
function f(du, u, h, p, t)
    h(out, p, t .- lags)
    du[1] = out[1]
    du[2] = out[1] + out[2]
    du[3] = u[2]
end
tspan = (0., 10.)
u0 = ones(3)
prob = DDEProblem(f, u0, h, tspan, constant_lags=lags)
sol = solve(prob, MethodOfSteps(Tsit5()))

But the following error is thrown.

julia> sol = solve(prob, MethodOfSteps(Tsit5()))
ERROR: MethodError: no method matching isless(::Array{Float64,1}, ::Float64)
Closest candidates are:
  isless(::Float64, ::Float64) at float.jl:459
  isless(::Missing, ::Any) at missing.jl:70
  isless(::AbstractFloat, ::AbstractFloat) at operators.jl:148
  ...
Stacktrace:
 [1] <(::Array{Float64,1}, ::Float64) at ./operators.jl:260
 [2] #call#29(::Nothing, ::Function, ::Array{Float64,1}, ::Nothing, ::Array{Float64,1}, ::Type{Val{0}}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/history_function.jl:53
 [3] (::DelayDiffEq.HistoryFunction{typeof(h),ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tsit5,OrdinaryDiffEq.InterpolationData{getfield(DelayDiffEq, Symbol("##35#41")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Array{Array{Float64,1},1},Dict{Symbol,Float64},Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}})(::Array{Float64,1}, ::Nothing, ::Array{Float64,1}, ::Type{Val{0}}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/history_function.jl:51 (repeats 2 times)
 [4] f(::Array{Float64,1}, ::Array{Float64,1}, ::DelayDiffEq.HistoryFunction{typeof(h),ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tsit5,OrdinaryDiffEq.InterpolationData{getfield(DelayDiffEq, Symbol("##35#41")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Array{Array{Float64,1},1},Dict{Symbol,Float64},Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing}}, ::Nothing, ::Float64) at ./REPL[16]:2
 [5] (::DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing})(::Array{Float64,1}, ::Array{Float64,1}, ::Vararg{Any,N} where N) at /home/sari/.julia/packages/DiffEqBase/6ewdP/src/diffeqfunction.jl:223
 [6] #37 at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:89 [inlined]
 [7] ODEFunction at /home/sari/.julia/packages/DiffEqBase/6ewdP/src/diffeqfunction.jl:188 [inlined]
 [8] initialize!(::DelayDiffEq.DDEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Float64,1},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tsit5,OrdinaryDiffEq.InterpolationData{getfield(DelayDiffEq, Symbol("##35#41")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,getfield(DelayDiffEq, Symbol("##37#43")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Array{Array{Float64,1},1},Dict{Symbol,Float64},Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing},typeof(DiffEqBase.ODE_DEFAULT_NORM),OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Discontinuity{Float64},DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Discontinuity{Float64},1}},Nothing,Array{Float64,1},Float64}, ::OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}) at /home/sari/.julia/packages/OrdinaryDiffEq/tat1c/src/perform_step/low_order_rk_perform_step.jl:623
 [9] initialize!(::DelayDiffEq.DDEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Float64,1},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing},Tsit5,OrdinaryDiffEq.InterpolationData{getfield(DelayDiffEq, Symbol("##35#41")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,getfield(DelayDiffEq, Symbol("##37#43")){DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.ODEIntegrator{Tsit5,true,Array{Float64,1},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{Array{Float64,1},1},Array{Array{Float64,1},1},Dict{Symbol,Float64},Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},ODEFunction{true,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},LinearAlgebra.UniformScaling{Bool},getfield(DiffEqBase, Symbol("##184#190")){DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing}},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,1},Float64,Nothing},typeof(DiffEqBase.ODE_DEFAULT_NORM),OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.LessThan},DataStructures.BinaryHeap{Discontinuity{Float64},DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Discontinuity{Float64},1}},Nothing,Array{Float64,1},Float64}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/integrator_interface.jl:195
 [10] #__init#34(::Array{Discontinuity{Float64},1}, ::Float64, ::Float64, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::Float64, ::Int64, ::Int64, ::Bool, ::Bool, ::Nothing, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(DiffEqBase.__init), ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Array{Float64,1},1}, ::Array{Float64,1}, ::Array{Any,1}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:266
 [11] __init(::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Array{Float64,1},1}, ::Array{Float64,1}, ::Array{Any,1}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:22
 [12] #__solve#51(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}, ::Array{Array{Float64,1},1}, ::Array{Float64,1}, ::Array{Any,1}) at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:373
 [13] __solve at /home/sari/.julia/packages/DelayDiffEq/NcMLM/src/solve.jl:373 [inlined]
 [14] #solve#456 at /home/sari/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:39 [inlined]
 [15] solve(::DDEProblem{Array{Float64,1},Tuple{Float64,Float64},Array{Float64,1},Array{Any,1},true,Nothing,DDEFunction{true,typeof(f),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Nothing}, ::MethodOfSteps{Tsit5,Nothing,Nothing,Nothing,false}) at /home/sari/.julia/packages/DiffEqBase/6ewdP/src/solve.jl:27
 [16] top-level scope at none:0

Any ideas what I am doing wrong?

Nothing is wrong if I change the delay differential equation is as follows.

function f(du, u, h, p, t)
    h(out, p, t)
    du[1] = out[1]
    du[2] = out[1] + out[2]
    du[3] = u[2]
end

But this seems errornous to me since the lags are not used while callling the history function, even if it outputs always one.

You need to do

function f(du, u, h, p, t)
    h(out, p, t - lags[1])
    du[1] = out[1]
    du[2] = out[1]
    h(out, p, t - lags[2])
    du[2] += out[2]
    du[3] = u[2]
end