mirror of
https://github.com/openai/codex.git
synced 2026-04-27 16:15:09 +00:00
app-server: treat null mode developer instructions as built-in defaults (#10983)
## Summary - make `turn/start` normalize `collaborationMode.settings.developer_instructions: null` to the built-in instructions for the selected mode - prevent app-server clients from accidentally clearing mode-switch developer instructions by sending `null` - document this behavior in the v2 protocol and app-server docs ## What changed - `codex-rs/app-server/src/codex_message_processor.rs` - added a small `normalize_turn_start_collaboration_mode` helper - in `turn_start`, apply normalization before `OverrideTurnContext` - `codex-rs/app-server/tests/suite/v2/turn_start.rs` - extended `turn_start_accepts_collaboration_mode_override_v2` to assert the outgoing request includes default-mode instruction text when the client sends `developer_instructions: null` - `codex-rs/app-server-protocol/src/protocol/v2.rs` - clarified `TurnStartParams.collaboration_mode` docs: `settings.developer_instructions: null` means use built-in mode instructions - regenerated schema fixture: - `codex-rs/app-server-protocol/schema/typescript/v2/TurnStartParams.ts` - docs: - `codex-rs/app-server/README.md` - `codex-rs/docs/codex_mcp_interface.md`
This commit is contained in:
committed by
GitHub
parent
739908a12c
commit
e6662d6387
@@ -408,6 +408,8 @@ async fn turn_start_accepts_collaboration_mode_override_v2() -> Result<()> {
|
||||
let request = response_mock.single_request();
|
||||
let payload = request.body_json();
|
||||
assert_eq!(payload["model"].as_str(), Some("mock-model-collab"));
|
||||
let payload_text = payload.to_string();
|
||||
assert!(payload_text.contains("The `request_user_input` tool is unavailable in Default mode."));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user