Canonical agent instructions for this repo live in
CLAUDE.md. Read it first — this file is a cross-tool entry point that points there and surfaces the highest-signal rules inline.
This is the client-side repo: codeam-cli (npm), the VS Code / Cursor / Windsurf extension, the JetBrains plugin, and @codeam/shared (the wire protocol). The backend lives in the sibling codeagent-mobile repo.
- Atención al detalle y buen gusto: todo lo que ve un usuario (y todo lo que genera el producto) se diseña, nunca se rellena. Reutiliza el componente que ya existe antes de crear uno "parecido", y mira el resultado en móvil y escritorio con datos reales antes de entregarlo. Sección completa en
CLAUDE.md→ "Atención al detalle y buen gusto". - Releases are tag-triggered: all three clients ship under ONE version line.
git tag vX.Y.Z && git push origin vX.Y.Zpublishes npm + VS Code Marketplace + Open VSX + JetBrains. Commits tomainrun CI but do NOT release. - Protocol code is shared: parsing / pricing / chunk shapes change ONLY in
packages/shared(@codeam/shared); both CLI and VS Code import through it. - No polling for realtime: react inside the PTY/SSE event (
OutputService.push), don't addsetTimeout"check again" loops. The HTTP-polling fallback incommand-relay.service.tsis the one documented exception. - Typing: no
as unknown as/anyto silence TS — fix the source.
A turn must NEVER end silently or with a misleading status. Tests: __tests__/agents/acp.failureBubble.test.ts.
failureBubbleis the sole arbiter, keyed on the agent's OWN error.- The provider-outage bubble fires ONLY from the agent's error — NEVER from polling the status page. A status-page incident can be live while the user's local agent is fine. The
checkProviderStatusstatus-page catch-all was removed inv2.42.0for that false positive. The status page is the link inside the bubble, not a trigger. - Auth notice as a completed-turn reply (
Not logged in · Please run /loginprinted as plain text, turn ends cleanly) → caught byreplyIsAuthFailure(≤200-char guard) → re-auth bubble +reportCredentialInvalid. - 1M-context usage-credits gate (
v2.43.0, reworked): claude Code v2.1.x always sends thecontext-1mbeta even on credit-less accounts → 429 "Usage credits required for 1M context" every turn.looksLike1mContextCreditsErrorclassifies it; the recovery is to reconnect the Claude subscription via the in-app OAuth (acodeam://reauthbubble +reportCredentialInvalid), because the credential simply lacks the entitlement — the old "Disable 1M context and continue"select_promptdid NOT fix it (2026-06-24) and was removed.
command-relay.service.ts's 20 s heartbeat shares the event loop with the ACP turn — it must do ZERO synchronous I/O. The git branch is seeded once at start() then refreshed via async detectCurrentBranchAsync off the hot path (v2.42.0). A synchronous git spawn on the tick can starve the beat (the "LAST PING —" stall).
~/.claude/.credentials.json MUST be a JSON blob. A bare setup-token (sk-ant-oat01-…) goes to the CLAUDE_CODE_OAUTH_TOKEN env var. The self-hosted guard is isJsonBlob in apps/cli/src/commands/host/agent-provisioning.ts; keep it byte-compatible with the backend's codespace getAuthSnippet.