Wiki / Models

Claude Code and Codex on your subscription#

If you pay for Claude (Pro, Max) or ChatGPT (Plus, Pro) you can run PortCode on that plan instead of an API key. Nothing is shared with PortCode: it starts the official claude or codex program on your machine, and that program uses the login you already made. PortCode never reads or stores their tokens.

There are two directions, and you can use both.

1. PortCode runs on your subscription#

portcode -m claude-code/sonnet      # Claude Code, any alias or full model id
portcode -m claude-code/default     # whatever your plan's default is
portcode -m codex/default           # Codex CLI

Or inside the app: /provider claude-code sonnet.

Before the first run, install the CLI and sign in once:

installsign in
Claude Codesee claude.com/claude-coderun claude and log in
Codexnpm i -g @openai/codexcodex login

portcode doctor shows whether each one was found.

What happens on a turn:

What does not apply to these models, because the CLI runs its own loop: the finish gate, the step limit, PortCode's permission prompts, /style and /effort, and context compaction (the CLI compacts by itself).

Permissions. Claude Code cannot ask you anything in this mode, so it needs a rule up front. Set it in portcode.json:

{ "cli_permission": "acceptEdits" }

acceptEdits (default) lets it edit files and refuses shell commands it was not pre-approved for. plan is read-only (the plan agent always uses it). bypassPermissions lets it run anything without asking, so use it only in a project and on a machine you trust. Codex runs in its workspace-write sandbox, or read-only for the plan agent.

2. Claude Code or Codex use PortCode's tools#

Use the tools from your usual Claude Code or Codex session, without starting PortCode's own screen:

portcode mcp --print-config     # shows the two commands below with your install path
claude mcp add portcode -- portcode mcp
codex mcp add portcode -- portcode mcp

Add --deep after mcp to also offer the reverse-engineering tools (only on software you own or may examine). The server offers no file or shell tools, since both CLIs have their own.

Good to know#

Edit this page on GitHub