Skip to content

fix(core): keep the lead MCP endpoint out of process argv and env - #529

Merged
kinqsradio merged 3 commits into
mainfrom
fix/bridge-token-env
Nov 12, 2026
Merged

kinqsradio merged 3 commits into
mainfrom
fix/bridge-token-env

Conversation

@kinqsradio

@kinqsradio kinqsradio commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The ACP stdio bridge reads the run's MCP endpoint from an owner-only file (acp-mcp-endpoint) in the run folder, named by ORBYN_ACP_MCP_ENDPOINT_FILE; the endpoint is no longer in any argv or environment.
  • The file goes with the run folder at run end; the token is revoked then too.
  • Audit: Claude gets a path to mcp.json (0600, run folder), Codex gets its endpoint over stdin; neither exposes the token. Docs updated; the "known limit" sentence is removed, the one about command lines and environment stays.

Closes #528

Parity rows

none

Frames built

Frames built: none

Testing

  • Review fixes: a warm-started Claude lead's mcp.json now lives in <data>/runs/warm-<id> (0700, removed when Orbyn drops the process or at the run's end, swept at start-up) instead of the temp folder; open_raw takes an explicit run folder; SPEC section 11 updated. The real-service test asserts the warm token file is under runs/warm-*/ and that no new orbyn-probe-* folder holds /mcp/.
  • CI covers the rest.
  • Real orbynd + fake ACP agent: the bridge's live argv and environment (read by sysctl KERN_PROCARGS2 on macOS, /proc on Linux) hold the file path and no token; the bridge lists tools and acp-mcp-call works from the file; the file is mode 0600; the run folder is gone after the run.
  • Unit tests for the file, the stdio entry and the Claude args; CLI tests refuse a missing or empty file and the old variable.
  • Not tested: Windows file ACL (inherits the app-data folder ACL); no real third-party ACP agent; the Claude test builds its file the way launch does rather than starting Claude.

Co-authors

none

AI usage

  • Written by hand, with no AI
  • Harness and version: Claude Code 2.1.321
  • Models: claude-sonnet-5-5 (implementation)
  • Effort: medium
  • Human role: assigned the task and its boundaries; review pending
  • Sources: none

Checklist

  • Works on Windows and macOS
  • docs/architecture.md with any rule change
  • No copied source, secrets, credentials or personal data; no AI attribution in commits, title or branch

The ACP stdio bridge got the run's endpoint, token included, in its
environment, which another process of the same user can read. It now gets
the path of an owner-only file in the run's folder, removed with the run.
@github-actions github-actions Bot added area: core crates/orbyn-core: runs, drivers, workspace, approvals, storage area: service crates/orbynd: local service and CLI area: docs docs and Markdown files labels Nov 12, 2026
A process started ahead of the next turn wrote its mcp.json, token included,
into a shared temporary folder. It now goes in a warm-<id> folder under the
runs folder. open_raw takes an explicit run folder. SPEC section 11 updated.
@github-actions github-actions Bot added the area: contracts crates/orbyn-contracts and web/src/generated label Nov 12, 2026
@kinqsradio
kinqsradio merged commit 978ea1e into main Nov 12, 2026
44 checks passed
@kinqsradio
kinqsradio deleted the fix/bridge-token-env branch November 12, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: contracts crates/orbyn-contracts and web/src/generated area: core crates/orbyn-core: runs, drivers, workspace, approvals, storage area: docs docs and Markdown files area: service crates/orbynd: local service and CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): keep the lead mcp endpoint out of process environments

1 participant