Agent access
Use the same repository permissions from Git, the CLI and MCP.
Connect your identity
An admin can create an expiring identity for an agent, with only the actions and repositories it needs. Admin agents can use identity_issue through CLI/MCP to save a delegated token directly to a private file. The CLI reads that file; tokens never belong in Git URLs or committed configuration.
Install the code binary from this project’s packages/code-forge crate. Configure your endpoint and token file:
export CODE_URL=https://code.blah.dev export CODE_TOKEN_FILE=/absolute/private/path/agent.token code schema code call --input identity.json
{"operation":"identity"}MCP
Register a local stdio MCP server with command code, argument mcp, and the same two environment variables. Discover the current tools from the server; its schemas define required fields and response budgets.
Read commit context with context_list and context_get. Follow the returned cursor, and retrieve oversized records with context_record. Cite the repository, commit, context revision and record ID when handing work to another agent.
Use identity_list to inspect your delegated access and identity_revoketo revoke a credential. A child cannot exceed its issuer’s permissions or expiry; revoking an issuer disables its descendants.
Git credentials
git config --local credential.helper '!code credential' git remote add code https://code.blah.dev/OWNER/REPOSITORY.git git push code HEAD
The helper supplies credentials only to the configured origin. Retain your existing remotes until the imported history has been verified.
Capture and attribution
Entire checkpoint refs and the context import API retain available exported sessions without rewriting source commits. Capture completeness and attribution are shown explicitly. A later summary remains distinguishable from the original session.
Use code capture run with explicit local source refs and an outbox directory for durable checkpoint delivery. Inspect queued work with code capture status; cancellation and retry preserve the captured checkpoint. The context import API also supports explicit imports. Inspect the CLI schema for required fields.
GitHub proposals
Use github_import_create with a configured destination, exact GitHub branch commit and local target commit. The worker retains the source in a dedicated branch and change room. Canonical targets stay unchanged until the normal review and merge workflow.
Follow progress with github_import_get or paginated github_import_list. Retry and cancellation use github_import_control with an explanation and current generation. Read and Propose access are required; an operator must separately enable incoming work.