Skip to content

Python: Integration: cowork-to-code-bridge for local Claude Code execution in agents #6541

@abhinaykrupa

Description

@abhinaykrupa

Problem

Agent Framework users building enterprise agents need reliable local execution for code-heavy tasks without:

  • Separate API key management
  • Cloud-only execution models
  • Additional billing outside existing subscriptions

Solution: cowork-to-code-bridge MCP Provider

cowork-to-code-bridge provides exactly that: agents escalate to Claude Code on the user's infrastructure using their existing subscription.

Key Features

  • No API keys — uses Claude subscription on the user's machine
  • Full local context — agent has access to repos, shell, MCPs, environment
  • MCP standard — JSONRPC 2.0 over stdio (native protocol)
  • Zero network ports — file-based queue, token-authenticated
  • Production-ready — 570 lines + 9 unit tests

How It Works

Agent Framework config:

{
  "providers": {
    "claude-code-bridge": {
      "type": "mcp",
      "command": "cowork-to-code-bridge-mcp",
      "args": ["--stdio"],
      "env": {"BRIDGE_ROOT": "$HOME/.cowork-to-code-bridge"}
    }
  }
}

Agent escalates work:

result = agent.escalate(
    tool="escalate_to_claude",
    request="Debug the API failure and propose fix",
    wait_seconds=600
)

Why This Matters

Agent Framework users building enterprise agents need reliable local execution for code-heavy tasks. cowork-to-code-bridge provides that without API key management: agents escalate to Claude Code on the user's infrastructure using their existing subscription.

Cost-effective, local-first alternative to cloud APIs.

Reference Implementation

Proposed Action

Options:

  1. Integration example showing MCP bridge provider in Agent Framework config
  2. Use case: "Build → test → debug workflow with local Claude Code execution"
  3. Or link from docs to our starter repo

(Happy to contribute any of these.)

Metadata

Metadata

Assignees

Labels

pythonIssues related to the Python codebase

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions