Context Protocol Upgrade: Background Tasks and Proactive User Queries in Practice
This article examines the upgrade of a general-purpose model context integration protocol, focusing on background tasks, proactive user clarification, server-delivered skills, direct file upload, and on-demand tool loading. It explains the engineering semantics, production constraints, and operational checklist required to make AI agents reliable enough for long-running business workflows.
1. From Connectivity to Collaboration: The Scale Inflection Point of the Protocol Ecosystem
Publicly available information indicates that, two years after a general-purpose model context integration protocol was introduced, its SDK has reached hundreds of millions of monthly downloads, and more than ten thousand external connectors are available.
The real significance of these numbers is not simply that there are more interfaces. Instead, the integration approach has effectively become a de facto standard: tool providers only need to implement the protocol once to be reused across multiple agent hosts, while hosts no longer need to build a private adapter for every system.
As scale increases, the main challenges shift. The early pain point was “cannot connect.” The current pain points are three different issues:
- Long-running tasks cannot be supported: A tool call is still assumed to be synchronous, short-lived, and immediately returnable. Jobs that take tens of seconds or longer are either forcibly split into smaller pieces or fail due to timeouts.
- Missing information leads to guessing: When parameters are incomplete, agents tend to fill in values on their own, causing inaccurate results. There is no compliant mechanism for “stopping and asking the user.”
- Tool definitions crowd out context: As the number of connectors grows, all tool descriptions remain resident in the context. The model may consume a large portion of its budget before it even begins the actual task.
The focus of this protocol update is to address these three gaps: background tasks, proactive user queries, and on-demand loading of tool descriptions. Understanding their engineering semantics is more important than memorizing their names.
2. Background Tasks: Turning Synchronous Calls into Trackable State Machines
The essence of the background task capability is to transform a tool call from “request—block—response” into “submit—poll/callback—completion notification.” The server receives the task, immediately returns a task identifier, executes the long-running job in the background, and actively notifies the host when the task is complete.
This requires changes on both the host side and the tool side:
- Submission and decoupling: Once the caller receives the task identifier, it can release the current inference turn instead of waiting idly.
- Observable state: A task should have at least five states:
submitted,running,succeeded,failed, andcancelled. It should also carry progress, error codes, and artifact references. - Completion notification and recovery: While waiting, the host can continue processing other work. When the notification arrives, the result is injected back into the context, forming a closed loop.
- Idempotency and deduplication: Notifications may be delivered more than once. The task identifier must be used as an idempotency key to prevent the same side effect from being executed twice.
The following is an illustrative interaction in pseudocode, expressing semantics only:
// 1) Submit a long-running task and return immediately{ "method": "tasks.create","params": { "job": "batch_report", "input": {"range": "2026-08-01~2026-08-31"} } }// -> { "task_id": "t-8842", "state": "running" }// 2) The host continues other work and later receives a completion notification{ "event": "task.completed","data": { "task_id": "t-8842", "state": "succeeded","artifact": "storage://reports/2026-08.pdf" } }
Implementation recommendations:
- Define both hard timeouts and soft timeouts. After a timeout, the task should become retryable.
- Store artifacts in object storage and pass references rather than inserting large results back into the context.
- Use a message queue to carry notifications.
- Use logging services and monitoring alerts to provide end-to-end tracing.
3. Proactive User Queries: Replacing Parameter Guessing with Compliant Interruptions
The proactive query mechanism allows a task to pause during execution, request specific missing information from the user, and resume after receiving an answer.
Its value is that it makes uncertainty explicit. Rather than allowing the model to invent a default value, it is better to pay the cost of one interaction in exchange for correctness.
Four design considerations are important:
- Minimal necessary questioning: Ask only for the fields that block the current step. Avoid questionnaire-style bombardment.
- Skippable and defaultable: Provide default strategies for optional information. Allow users to decline and let the workflow continue in a degraded mode.
- Timeout fallback: If there is no response for a long time, automatically cancel the task or converge to a safe default to prevent tasks from hanging.
- Minimize sensitive information: For fields involving credentials, identity, or financial data, prefer references or tokens over plaintext return values, and ensure redacted logging throughout the process.
4. Server-Delivered Skills: On-Demand Loading of Organization-Level Knowledge
The experimental “skills delivered with the protocol” capability allows the server to provide not only tools and resources, but also specialized knowledge for specific users or organizations: best practices, step-by-step workflows, and account-level operating instructions.
Skills are loaded on demand and updated on the server side. In effect, this moves prompt engineering from the host side to the server side.
The engineering significance is a shift in governance boundaries. The producers of knowledge, such as business systems, are decoupled from the consumers, such as agents. Version upgrades no longer require client-side changes.
However, constraints are necessary:
- Skill content should be treated as untrusted input.
- Source validation and permission filtering are required to prevent unauthorized data from leaking through skills.
- Version numbers and effective scope should be retained to support rollback.
5. Direct File Upload and Context Budget Governance
The planned file upload capability will allow users to hand documents, spreadsheets, and images directly to the server for processing, avoiding repeated reading and paraphrasing by the host.
This is paired with on-demand loading of tool descriptions: specific tool definitions are loaded only when the task truly needs them, significantly reducing context usage.
Together, these capabilities point to one design principle: context is a finite budget and must be managed explicitly.
In practice, context can be managed in layers:
- The resident layer contains only a small number of high-frequency tools and routing rules.
- The retrieval layer recalls candidate tools based on semantic relevance.
- The execution layer loads full parameter schemas only when needed.
Combining result summarization with external references for long text can preserve more budget for reasoning itself.
On platforms such as Baidu AI Cloud, this type of architecture is typically implemented with container platforms for service hosting, message queues for notification decoupling, object storage for artifacts, and logging plus monitoring alerts for observability. These are general product categories and do not depend on vendor-specific interfaces.
6. Production Readiness Checklist
- All long-running tasks have state machines, idempotency keys, timeout semantics, and cancellation semantics.
- Proactive queries follow the principles of minimal necessity, skippability, and redaction.
- Skills and tool definitions are delivered with least privilege, while retaining version and audit information.
- Context is allocated across three budget layers: resident, retrieval, and execution.
- The full pipeline has metrics, logs, and alerts, and failures can be replayed.
7. Conclusion
The scaling of the protocol ecosystem shifts the competitive focus from the number of connections to the reliability of autonomous execution.
Background tasks solve the duration problem. Proactive queries solve the information gap. Server-delivered skills solve knowledge reuse. Direct file upload and on-demand loading solve context efficiency.
Together, these four capabilities provide the foundation for agents to run autonomously over long periods in real business workflows. The engineering disciplines of idempotency, permissions, and observability determine whether the result is a production system or merely a demo script.
