HappierDocs
Agents and models

Pi (experimental)

Configure Pi Coding Agent in Happier (ACP), including install and detection.

Happier can run Pi Coding Agent through the local pi CLI.

Pi is an experimental integration. It works and people use it daily, but its surface is younger than Claude, Codex or OpenCode and is more likely to change. What it supports today is in Agent capabilities.

Install Pi

Happier can install it for you:

happier install provider pi
pi --version

Or install manually:

npm install -g @earendil-works/pi-coding-agent
pi --version

Start Pi with Happier

happier pi

Continue the last session

In development builds, Pi's own --continue (or -c) picks up where you left off:

happier pi --continue

Pi uses the current working directory and its own session settings to select the most recent session. Run the command from the project directory where you started Pi. If no session matches, Pi starts a new one. --resume <session-id> takes precedence over --continue.

Native terminal

Development builds only. Released versions still show the Happier terminal view for Pi.

Turn on Use Pi's native terminal in Pi's provider settings, then run happier pi in your own terminal. Pi opens its native interface and the same session appears in Happier. The setting is off by default and takes effect the next time you start Pi.

  • Typing in Happier and talking to the session by voice both send to the open Pi process. Automatic voice playback in this mode requires an updated Happier app. It reads the next completed reply in the session, which may be a reply to a message someone typed in the terminal. Keep the setting off for the existing voice experience with Happier 0.2.23.
  • Prompts you type in the terminal, and Pi's replies, show up in the Happier conversation. The session shows as working while a terminal run is in progress. Ready notifications follow the completed Pi turn, including turns you start in the terminal.
  • A message sent from Happier runs in the same Pi process and session file, so the terminal shows it live. Happier delivers it only while Pi is idle. A message sent while Pi is busy, including during a run you started in the terminal, waits and then runs once, when that run ends.
  • Stop in Happier stops the current run, including one you started in the terminal. Like pressing Esc, it moves messages you had queued in Pi back into the editor. A Happier message still waiting in Happier is withdrawn. If Pi is preparing a message and cannot confirm cancellation, it may start afterward. You can stop the active run once it appears.
  • You can switch Pi's model from Happier.

Pi owns the session here, so some controls stay in the terminal:

  • Happier cannot start a new session, resume, fork or compact. Extension dialogs are answered in the terminal, and images you paste in the terminal are not mirrored.
  • The permission mode is fixed when Pi starts. Changing it in Happier does not change the tools of the running Pi.
  • /clear from Happier does not reset the session. Happier replies with a notice instead: quit Pi and run happier pi again for a fresh session. Settings that would need Pi to restart are not applied either, and Happier says so.
  • After /new, /resume or /fork in the terminal, Happier posts a notice and delivers no messages to Pi while the terminal is on another session. A message you send meanwhile shows as temporarily unavailable; send it again once the terminal is back. When the terminal returns to this session, Happier reconnects by itself and terminal activity shows up again.
  • /reload keeps the link. If Happier cannot reconnect to the terminal, it posts a notice; sending a message retries.
  • While Pi has the terminal, Happier writes its diagnostics to its log file, not to the terminal. Only a failure of the launcher that runs Pi can print a line there.
  • Quitting Pi (/quit or Ctrl+D) ends the Happier session process. The session stays in Happier and can be resumed. Stopping the session from Happier closes Pi.

Happier keeps its own Pi view when the session starts from the app or the daemon, when there is no interactive terminal, inside a --tmux, herdr or zellij pane, and when the session uses connected-service credentials. In the last case happier pi prints a one-line notice before it starts.

Extension-started runs

In development builds, text submitted by Pi extensions appears in the Happier conversation, and runs started by extensions show the session as working. Repeated submissions remain separate messages, even when their text is identical.

A recorded input may still be transformed or handled by another extension, or cancelled while queued. Its appearance in the conversation does not by itself confirm that the model received it. This support covers text inputs; it does not add extension-input image attachments.

Permissions

Use the shared permission vocabulary when starting Pi:

happier pi --permission-mode read_only
happier pi --permission-mode auto

Read-only limits Pi to Happier's read-tool allowlist. Auto, Default, and YOLO do not pass Pi's --tools option, so Pi keeps its full native catalog, including the platform shell and installed extension/custom tools such as subagents. Auto is not a workspace-confinement guarantee. Older spellings such as safe-yolo and workspace_write remain accepted for compatibility.

For the cross-provider vocabulary and aliases, see Permissions.

Local authentication in Happier

Pi does not currently expose a native interactive login flow through Happier provider settings.

Instead, Happier shows the machine-local auth state for Pi in:

  • Settings → AI & Agents → AI backends → Pi

Today that status is based on supported environment-backed credentials on the selected machine.

For the shared user guide, see Provider authentication.

Authentication (connected services)

Pi can reuse connected services profiles when spawned by Happier:

  • openai-codex (subscription OAuth)
  • openai (API key)
  • claude-subscription (OAuth or setup-token) for Claude subscription auth
  • anthropic for Anthropic API key auth (ANTHROPIC_API_KEY)

Happier materializes compatible connected services into Pi's isolated PI_CODING_AGENT_DIR/auth.json before launch. Claude subscription OAuth profiles are written as Pi OAuth credentials; setup-token and API-key profiles are written as Pi API-key credentials.

If multiple compatible profiles exist, Happier will let you pick one when starting a new session.

Policy note: Claude subscription OAuth credentials are intended for ordinary Claude subscription use in native Anthropic applications. Developers building third-party products should use Anthropic API keys or supported cloud providers unless their policy/legal review permits this Pi integration path.

See: Connected services

Troubleshooting

If Pi is not detected:

  1. Verify pi --version works.
  2. Restart Happier.
  3. Set HAPPIER_PI_PATH if your binary is not in PATH.

Pi's vendor-managed installer can put its launcher at ~/.pi/agent/bin/pi, or under PI_CODING_AGENT_DIR/bin/pi when that directory is configured. An already running daemon may retain a PATH from before installation. Point HAPPIER_PI_PATH at the launcher and restart the daemon if terminal launches work but daemon launches fail.

Current development builds also discover these locations when PATH has no Pi executable. If launch resolution still fails, they report provider_cli_not_found with installation or override guidance. An invalid HAPPIER_PI_PATH must be corrected or unset; it does not fall back to another installation.

On this page