• Home
  • Technology
  • Gaming
  • Entertainment
  • World & Business
  • Science
  • Sports
  • AI
HomeTechnologyGamingEntertainmentWorld & BusinessScienceSportsAI
  • HomeTechnologyGamingEntertainmentWorld & BusinessScienceSportsAI
    • Home
    • Technology
    • Gaming
    • Entertainment
    • World & Business
    • Science
    • Sports
    • AI
    AI

    Joël Niklaus Highlights Speculative Programmatic Tool Calling

    Hugging Face engineer describes sPTC parsing and pre-launching tool calls during streaming.

    CS
    JN
    WP
    3 Sources, 29d ago, first seen 29d ago

    TLDR

    Joël Niklaus of Harness Optimization at Hugging Face posted on X praising Speculative Programmatic Tool Calling. He called the idea neat and clean. The post states that most agent harnesses wait for a model to finish generating a REPL program before executing its tool calls. sPTC parses the program while it streams, pre-launches safe calls in a shadow REPL, and reuses the result if the final program makes that call. The tweet includes a 56-second terminal screen recording of a side-by-side demo UI comparing the speculative approach on the left with the standard approach on the right.

    Combined views

    7.7K

    3 Sources, first seen 29d ago

    Combined views

    7.7K

    3 Sources, first seen 29d ago

    125 likes
    125 likes
    3 comments
    115 saves
    15 reposts

    Sentiment

    Positive——Negative

    Summary

    Not enough discussion yet.

    No sentiment analysis available yet.

    3 comments
    115 saves
    15 reposts

    Sentiment

    Positive——Negative

    Summary

    Not enough discussion yet.

    No sentiment analysis available yet.

    Today's Rank

    —

    Not ranked yet

    Today's Rank

    —

    Not ranked yet

    3 Sources

    @joelniklausSpeculative Programmatic Tool Calling is such a neat and clean idea! Most agent harnesses wait for the model to finish generating a REPL program before executing its tool calls. sPTC parses the program while it streams, pre-launches safe calls in a shadow REPL, and reuses the result if the final program makes that call. It can also parallelize independent calls that the generated code wrote as blocking. In effect, it is a small JIT layer for agent programs. The first RLM experiments show up to roughly 1.2x speedups, depending heavily on the trajectory and tool latency. Finally got around to reading this latest banger from @a1zhang. Follow him if you care about RLMs, agents, or harness design. He has a gift for making useful systems ideas feel obvious once you see them. Blog post: https://alexzhang13.github.io/blog/2026/spec-ptc/
    @weaviatepodcastStarting an agent's tool calls early only helps if the early run cannot break anything. On the Weaviate Podcast, Alex Zhang explains why his speculative programmatic tool calling stays cautious. The shadow REPL fires a call only on paths it can parse as safe, refusing anything that might mutate state. He would like to speculate more aggressively, perhaps letting a model predict which calls will happen. Hear how speculative programmatic tool calling picks what is safe to run early 👇 https://www.youtube.com/watch?v=uGULmNrQSmk
    @CShorten30RT @weaviatepodcast: Starting an agent's tool calls early only helps if the early run cannot break anything. On the Weaviate Podcast, Alex…

    3 Sources

    @joelniklausSpeculative Programmatic Tool Calling is such a neat and clean idea! Most agent harnesses wait for the model to finish generating a REPL program before executing its tool calls. sPTC parses the program while it streams, pre-launches safe calls in a shadow REPL, and reuses the result if the final program makes that call. It can also parallelize independent calls that the generated code wrote as blocking. In effect, it is a small JIT layer for agent programs. The first RLM experiments show up to roughly 1.2x speedups, depending heavily on the trajectory and tool latency. Finally got around to reading this latest banger from @a1zhang. Follow him if you care about RLMs, agents, or harness design. He has a gift for making useful systems ideas feel obvious once you see them. Blog post: https://alexzhang13.github.io/blog/2026/spec-ptc/
    @weaviatepodcastStarting an agent's tool calls early only helps if the early run cannot break anything. On the Weaviate Podcast, Alex Zhang explains why his speculative programmatic tool calling stays cautious. The shadow REPL fires a call only on paths it can parse as safe, refusing anything that might mutate state. He would like to speculate more aggressively, perhaps letting a model predict which calls will happen. Hear how speculative programmatic tool calling picks what is safe to run early 👇 https://www.youtube.com/watch?v=uGULmNrQSmk
    @CShorten30RT @weaviatepodcast: Starting an agent's tool calls early only helps if the early run cannot break anything. On the Weaviate Podcast, Alex…