How to
How to give coding agents access without pasting tokens
Do not paste API keys, service tokens, or `.env` contents into an agent prompt or MCP config. RunEnv Agent Guard lets a supported coding agent preview and execute approved actions without general secret-read access.
How it works
Three steps for the supported path.
- 01
Scan the workspace
Run `runenv agent doctor .` locally. Fix any credentials that would otherwise land in agent context.
- 02
Connect the agent through OAuth
Sign in with `runenv login`, preview `runenv agent connect <codex|claude|copilot|cursor> --project <project-id>`, then apply only after review.
- 03
Preview, approve, and execute
The agent lists capabilities and requests a permit when required. A human can require approval. Use the documented rollback command if an applied adapter change needs to be undone.
Scan first
`runenv agent doctor .` scans the current workspace locally for likely credential exposure. It does not require an account.
Connect a supported agent
RunEnv supports `codex`, `claude`, `copilot`, and `cursor` adapters. Preview the files that would change, then apply OAuth only after review.
- `runenv agent connect cursor --project <project-id>`
- `runenv agent connect claude --project <project-id>`
- `runenv agent connect codex --project <project-id>`
There is no secret-read tool
The Agent Guard MCP surface exposes bounded action tools such as preview, request permit, execute, status, cancel, and rollback. Unknown fields and unredacted credential-shaped fields fail closed. Action arguments that look like secrets may contain only the literal `[REDACTED]` marker.