cowork-to-code-bridge — async bridge letting DSPy modules delegate work to Claude Code on your local machine #9934
abhinaykrupa
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Show and Tell: cowork-to-code-bridge — let DSPy modules delegate to Claude Code on your local machine
Hey DSPy community,
I've been building agents with DSPy and kept hitting the same wall: the agent runs in a cloud sandbox (or CI), but the interesting work — running evals, generating embeddings, calling local tools — needs to happen on my actual machine. I ended up building cowork-to-code-bridge: an async, file-based RPC bridge that lets a sandboxed agent queue work for Claude Code running locally, with no open ports and no auth tokens flying around.
How it fits into a DSPy program
You can drop this module into any DSPy
ChainOfThoughtorReActprogram and the optimizer never has to care that the eval ran on a different machine.What the bridge handles
queue_task/poll_task_resultWhy it's useful for DSPy specifically
DSPy's teleprompters and optimizers can run for a long time. The bridge lets you keep the optimization loop in the sandbox while expensive side-effects (file I/O, subprocess evals, GPU jobs) stay on the local machine — and the budget cap means a runaway optimizer can't silently rack up costs.
Repo: https://github.com/abhinaykrupa/cowork-to-code-bridge
Question for the community: Are you running DSPy optimizers in cloud sandboxes today? What's your current strategy for connecting them to local evals or tools — and would an async bridge like this fit into your workflow?
Beta Was this translation helpful? Give feedback.
All reactions