mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Keep the sleep tool outside code mode (#34969)
## What changed - Mark `clock.sleep` as `DirectModelOnly` so it remains directly callable in code-mode-only sessions without appearing in the nested code-mode tool surface. - Cover both code mode configurations with a tool-plan test that verifies the sleep tool's exposure and visibility. GitOrigin-RevId: 7ef67bea0678f27fdb17d88004368e5f1d475125
This commit is contained in:
1 parent
9e1f43dc2d
commit
205d37a20f
2 files changed
+54
No files matched your search
@@ -13,6 +13,7 @@ use codex_tools::JsonSchema;
|
||||
use codex_tools::ResponsesApiNamespace;
|
||||
use codex_tools::ResponsesApiNamespaceTool;
|
||||
use codex_tools::ResponsesApiTool;
|
||||
use codex_tools::ToolExposure;
|
||||
use codex_tools::ToolName;
|
||||
use codex_tools::ToolSpec;
|
||||
use serde::Deserialize;
|
||||
@@ -68,6 +69,10 @@ impl ToolExecutor<ToolInvocation> for SleepHandler {
|
||||
create_sleep_tool()
|
||||
}
|
||||
|
||||
fn exposure(&self) -> ToolExposure {
|
||||
ToolExposure::DirectModelOnly
|
||||
}
|
||||
|
||||
fn handle(&self, invocation: ToolInvocation) -> codex_tools::ToolExecutorFuture<'_> {
|
||||
Box::pin(async move {
|
||||
let ToolInvocation {
|
||||
|
||||
Reference in new issue
Block a user