You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cli] resume_conversation: apply per-thread mcp_servers and env to workers #1754
The desktop (PR inference-gateway/desktop#458, issue inference-gateway/desktop#415) sends two optional fields on the resume_conversation frame of the daemon binding protocol when a thread opens as a Markdown agent with an AgentMail inbox:
The frame shape is agreed with the desktop side: mcp_servers is an array of per-thread MCP servers (name, url, static headers) and env is a map of extra worker environment variables. Today workers ignore both, so the agent's inbox exists but its chat cannot mail until the worker applies the frame.
Acceptance Criteria
resume_conversation accepts optional mcp_servers (name, url, headers) and env; older clients that omit them are unaffected.
A session worker starts its infer headless child with the frame's env merged over the daemon's environment (here AGENTMAIL_API_KEY, so the agentmail skill also works).
A session worker brings up the named MCP servers for that thread on top of its configured ones, headers merged over configured defaults for a reused name.
Subagent threads the worker opens (subagent-<parent>-<child>) carry the same per-thread MCP servers and env, so a run the agent spawns mails as the same identity.
The fields stay optional and are never sent on any other binding frame.
Closing in favour of configuration instead of a frame extension.
Why not the frame: ThreadOptions names what a thread is (model, mode, prompt, agent), not how the tools context connects. mcp_servers with url and headers would make the desktop own a second copy of the MCP server schema, and env would reverse the rule that ThreadOptions.Env never travels on the wire (it is json:"-", filled daemon-side as teleport does). The frame is also carried by relays, teleports, A2A peers and five client-side frame structs, so a secret on it has many more readers than the one worker. The agent is already resolved on the daemon from its name, so its wiring belongs with the computer it runs on.
Replacement:
[FEATURE] Hosted MCP servers: url and headers in mcp.yaml #1755: url and headers on a server entry in mcp.yaml, with ${AGENTMAIL_API_KEY} expansion and a skip when the header is empty. This also fixes that a hosted MCP with an API key header could not be configured by anyone.
[FEATURE] Kubernetes workspace secrets from existing cluster Secrets #1756: a Kubernetes workspace reads existing cluster Secrets into its pod daemon's environment, so each of twelve agents on twelve computers holds its own key. A daemon-kind workspace already has this through its own environment or ~/.infer/auth.yaml.
inference-gateway/desktop follow-up to drop mcp_servers and env from ThreadOptions and write mcp.yaml plus the workspace Secret instead.
Correction to the close comment: ~/.infer/auth.yaml does not reach a daemon's workers. Only the gateway and A2A supervisors read it, and ${VAR} in mcp.yaml expands from the process environment. A daemon-kind workspace gets the key from the environment its infer daemon runs with, and a Kubernetes workspace from its secrets (#1756). inference-gateway/desktop#473 is updated to match.
Activity
edenreich commentedon Nov 8, 2026
Closing in favour of configuration instead of a frame extension.
Why not the frame:
ThreadOptionsnames what a thread is (model, mode, prompt, agent), not how the tools context connects.mcp_serverswithurlandheaderswould make the desktop own a second copy of the MCP server schema, andenvwould reverse the rule thatThreadOptions.Envnever travels on the wire (it isjson:"-", filled daemon-side as teleport does). The frame is also carried by relays, teleports, A2A peers and five client-side frame structs, so a secret on it has many more readers than the one worker. The agent is already resolved on the daemon from its name, so its wiring belongs with the computer it runs on.Replacement:
[FEATURE] Hosted MCP servers: url and headers in mcp.yaml #1755:
urlandheaderson a server entry inmcp.yaml, with${AGENTMAIL_API_KEY}expansion and a skip when the header is empty. This also fixes that a hosted MCP with an API key header could not be configured by anyone.[FEATURE] Kubernetes workspace secrets from existing cluster Secrets #1756: a Kubernetes workspace reads existing cluster Secrets into its pod daemon's environment, so each of twelve agents on twelve computers holds its own key. A daemon-kind workspace already has this through its own environment or
~/.infer/auth.yaml.inference-gateway/desktop follow-up to drop
mcp_serversandenvfromThreadOptionsand writemcp.yamlplus the workspace Secret instead.Desktop follow-up: [TASK] Refactor drop mcp_servers and env from the resume_conversation frame desktop#473
Docs: [DOCS] Hosted MCP servers in mcp.yaml and Kubernetes workspace secrets docs#1128
edenreich commentedon Nov 8, 2026
Correction to the close comment:
~/.infer/auth.yamldoes not reach a daemon's workers. Only the gateway and A2A supervisors read it, and${VAR}inmcp.yamlexpands from the process environment. A daemon-kind workspace gets the key from the environment itsinfer daemonruns with, and a Kubernetes workspace from itssecrets(#1756). inference-gateway/desktop#473 is updated to match.feat(mcp): reach hosted servers through a url and headers in mcp.yaml (…