From Context Budget to Completed Task

“Compare cold and warm load times for the embedding model.” That was the suggestion I wanted an agent to leave in my inbox. Typing it takes one sentence. Delivering it takes a tool definition, an addressed request, a reply and enough room to check what the reply says.

In the runtime experiment I measured how much context a loaded model could accept. This time I gave the caller a smaller working budget of 512 tokens, with 128 reserved for the reply and verification. The goal was narrow enough to test in full. Success meant the suggestion reached the inbox. Benchmarking the model would be a later task for the person who picked it up. From Model File to Running Service

What went through the tool

The caller discovered submit_task through MCP and built a request containing the suggestion and a unique request ID. I counted the serialized goal, tool schema, history and outgoing call with the local Nomic tokenizer. These counts describe this experiment's caller. MCP carries the messages and leaves token accounting to the application. A chat client repeating the exercise should count its own tokenizer and message framing.

I used Django's HTTP test client to send JSON-RPC messages to the site's probe with a temporary inbox. The probe saved the suggestion and returned a receipt. The caller checked the receipt against the request ID, then the test independently read the saved row and compared the full message. That last check matters because an HTTP 200 can carry a tool error.

Decide what can leave the window

I padded the history with 65 short entries to force the decision. The first run had a useful fact buried in repetitive notes about disk size. I replaced those notes with “Earlier run measured disk size.” The second run carried page-title edits from an unrelated job, so I cleared the history. Both runs kept the current goal, the tool schema and the complete outgoing call.

Run Tokens before Tokens after Left at finish Recorded outcome
Compact the disk notes 954 378 9 Success. Receipt and saved suggestion matched.
Clear the old editing history 1,016 367 23 Success. Receipt and saved suggestion matched.
Clear history, goal missing 1,002 353 134 Clarification. The caller asked what Andi should build or test before sending anything.
Clear history, malformed request ID 990 341 65 Failed. The tool returned “A valid UUID is required.”

The first two numeric columns count the context in use. The third shows unused space after the reply or clarification and the final status. In the compact run, 378 tokens left 134 free before the call. The receipt and status used 125 of those. A runner that budgeted only for the outgoing message would have missed the tightest part of the task.

What counts as done?

The caller can act when the goal and tool arguments are complete and the reply fits the budget. If the goal is missing, it can ask one concrete question. If the tool reports an error, it can retain that error with the task. Saving the request ID also gives it a way to retry after a lost reply without creating a second suggestion.

Run python -m tools.runtime_field_notes to repeat all four cases against the isolated inbox. To try the public version, point an MCP client at the probe and ask it to leave one small task for me. Tell me what observation would convince you it worked. The receipt means I received the suggestion for review. Open the task probe