Skip to content

feat: support template interpolation in multi-agent usage hints#20973

Merged
jif-oai merged 1 commit into
mainfrom
jif/template-interpolation
May 4, 2026
Merged

feat: support template interpolation in multi-agent usage hints#20973
jif-oai merged 1 commit into
mainfrom
jif/template-interpolation

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 4, 2026

Why

multi_agent_v2 usage hints sometimes need to reference resolved config values such as the effective thread limit. Those values only exist after config layering, defaulting, and feature materialization, so the raw TOML alone was not enough to render them.

What changed

  • allow features.multi_agent_v2.{usage_hint_text,root_agent_usage_hint_text,subagent_usage_hint_text} to use {{ ... }} placeholders backed by the materialized effective config
  • fail config loading with a targeted error when a referenced placeholder does not exist or does not resolve to a scalar value
  • move resolved-config materialization into a shared helper so config interpolation and config-lock export/replay both serialize the same resolved feature, memory, and agent settings

Example

[features.multi_agent_v2]
enabled = true
usage_hint_text = "lorem {{ features.multi_agent_v2.max_concurrent_threads_per_session }} ipsum"

gets rendered as

        "description": String("... \lorem 4 ipsum"),
@jif-oai jif-oai requested a review from a team as a code owner May 4, 2026 09:33
@jif-oai jif-oai changed the title feat: add template interpolation feat: support template interpolation in multi-agent usage hints May 4, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 4, 2026

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a 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.

Reviewed commit: 4b3555610b

ℹ️ 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".

Comment thread codex-rs/core/src/config/template_interpolation.rs
@jif-oai jif-oai merged commit f48b777 into main May 4, 2026
26 checks passed
@jif-oai jif-oai deleted the jif/template-interpolation branch May 4, 2026 09:50
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant