fix(agent-loop): update required properties to include workdir and ti… (#530)

Without this I get an issue running codex it in a docker container. I
receive:

```
{
    "answer": "{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"\\\"Say hello world\\\"\"}],\"type\":\"message\"}\n{\"id\":\"error-1745325184914\",\"type\":\"message\",\"role\":\"system\",\"content\":[{\"type\":\"input_text\",\"text\":\"⚠️  OpenAI rejected the request (request ID: req_f9027b59ebbce00061e9cd2dbb2d529a). Error details: Status: 400, Code: invalid_function_parameters, Type: invalid_request_error, Message: 400 Invalid schema for function 'shell': In context=(), 'required' is required to be supplied and to be an array including every key in properties. Missing 'workdir'.. Please verify your settings and try again.\"}]}\n"
}
```

This fix makes it work.
This commit is contained in:
Thomas
2025-04-23 00:32:36 +10:00
committed by GitHub
parent c00ae2dcc1
commit d78f77edb7

View File

@@ -649,7 +649,7 @@ export class AgentLoop {
"The maximum time to wait for the command to complete in milliseconds.",
},
},
required: ["command"],
required: ["command", "workdir", "timeout"],
additionalProperties: false,
},
},