File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -992,7 +992,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
992
992
logger .Debug (ctx , "container ID changed, injecting subagent into new container" ,
993
993
slog .F ("old_container_id" , proc .containerID ),
994
994
)
995
- maybeRecreateSubAgent = true
995
+ maybeRecreateSubAgent = proc . agent . ID != uuid . Nil
996
996
}
997
997
998
998
// Container ID changed or the subagent process is not running,
@@ -1157,7 +1157,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1157
1157
subAgentConfig .DisplayApps = displayApps
1158
1158
}
1159
1159
1160
- deleteSubAgent := maybeRecreateSubAgent && ! proc .agent .EqualConfig (subAgentConfig )
1160
+ deleteSubAgent := proc . agent . ID != uuid . Nil && maybeRecreateSubAgent && ! proc .agent .EqualConfig (subAgentConfig )
1161
1161
if deleteSubAgent {
1162
1162
logger .Debug (ctx , "deleting existing subagent for recreation" , slog .F ("agent_id" , proc .agent .ID ))
1163
1163
client := * api .subAgentClient .Load ()
You can’t perform that action at this time.
0 commit comments