-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Send delegate header #5942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send delegate header #5942
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[serde(rename_all = "snake_case")] | ||
| #[ts(rename_all = "snake_case")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep SubAgentSource serde names compatible
Adding #[serde(rename_all = "snake_case")] changes the serialized form of every SubAgentSource value (e.g. Review → review). We already persist SessionSource::SubAgent inside rollout JSONL files, and existing data on disk uses the old casing. After this change serde will refuse to deserialize those records, so code such as read_summary_from_rollout / extract_conversation_summary in codex-rs/app-server/src/codex_message_processor.rs (and the rollout list code) will fail when they call serde_json::from_value::<SessionMeta>. That makes previously recorded subagent sessions unreadable. Please keep the prior variant names (or add backward-compatible deserialization) instead of renaming them outright.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok when comments are processed
| .and_then(|v| v.as_str().map(std::string::ToString::to_string)) | ||
| .unwrap_or_else(|| "other".to_string()) | ||
| }; | ||
| req_builder = req_builder.header("x-openai-subagent", subagent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure the infra team is aware of the new header name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes they are
| Err(_) => "unknown".to_string(), | ||
| }; | ||
| req_builder = req_builder.header("Codex-Task-Type", task_type); | ||
| // Include subagent header only for subagent sessions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can actually always have it. It will just give more data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the absence of it plus the originator give us the same data
Send delegate type header