fix: Codex round 8 — remote success propagation + stale question cleanup
Some checks failed
CI / test (push) Failing after 3s
Some checks failed
CI / test (push) Failing after 3s
Medium: remote dispatch now propagates inner dispatchOut.Success instead of hardcoding true. Low: updateStatus clears stale question field when new state has no question, preventing leftover rejection messages. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d94eed0b54
commit
6da52aa60f
2 changed files with 3 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ func (s *PrepSubsystem) dispatchRemote(ctx context.Context, _ *mcp.CallToolReque
|
|||
} else if len(rpcResp.Result.Content) > 0 {
|
||||
var dispatchOut DispatchOutput
|
||||
if json.Unmarshal([]byte(rpcResp.Result.Content[0].Text), &dispatchOut) == nil {
|
||||
output.Success = dispatchOut.Success
|
||||
output.WorkspaceDir = dispatchOut.WorkspaceDir
|
||||
output.PID = dispatchOut.PID
|
||||
output.Agent = dispatchOut.Agent
|
||||
|
|
|
|||
|
|
@ -280,6 +280,8 @@ func updateStatus(wsDir, status, question string) {
|
|||
st["status"] = status
|
||||
if question != "" {
|
||||
st["question"] = question
|
||||
} else {
|
||||
delete(st, "question") // clear stale question from previous state
|
||||
}
|
||||
updated, _ := json.MarshalIndent(st, "", " ")
|
||||
coreio.Local.Write(filepath.Join(wsDir, "status.json"), string(updated))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue