Skip to content

fix(oss-dev): start Tangent with its own start_local.sh, and document what Tangent needs - #3122

Merged
camielvs merged 1 commit into
masterfrom
fix/oss-dev-tangent-setup
Dec 3, 2026
Merged

camielvs merged 1 commit into
masterfrom
fix/oss-dev-tangent-setup

Conversation

@camielvs

@camielvs camielvs commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Intent

Make pnpm oss:dev and the README enough, on their own, to get Projects and Tangent running locally against the open-source backend and Tangent shell.

Current behavior

A from-scratch install that followed the READMEs got stuck at several points:

  • pnpm oss:dev failed with tsx: command not found until pnpm install had been run.
  • It never installed the pi agent binary. Its warning said "Tangent will boot but agents cannot respond", but the Tangent server refuses to start without pi, so oss:dev waited two minutes and gave up.
  • It only passed LLM gateway credentials (PI_PROXY_URL / PI_PROXY_API_KEY) to Tangent, not provider keys such as OPENAI_API_KEY. It also copied tangent-shell's .env.example into a live .env, which handed agents a placeholder gateway address.
  • Saved pipelines stayed off, so the pipelines a project linked to lived only in the browser, out of the agent's reach.
  • The README didn't say that Tangent needs saved pipelines or an LLM key.

What changes

  • pnpm oss:dev installs the app's dependencies first.
  • It starts Tangent with tangent-shell's own start_local.sh, passing the ports, Tangle API address and agent bundle explicitly. That script installs pi, wires OPENAI_API_KEY / ANTHROPIC_API_KEY (or the gateway pair) into its own .env, and seeds the bundles, so the two setups no longer drift apart.
  • It warns up front when no LLM credentials are set, and says which variables to set.
  • It writes VITE_REMOTE_PIPELINES=true into the app's .env, next to VITE_ENABLE_TANGENT=true.
  • A workspace it creates names the shell's bundle (tangentBundleId: "tangle-oss", from fix(tangent): start sessions with the bundle the workspace names #3123), and when workspaces already exist it warns about any that don't name a bundle, since their sessions ask for tangle.
  • Its health wait is longer (300 s), since the first start installs Tangent's dependencies and pi.
  • README, Projects and Tangent (beta): Projects names the backend's neurips-2026 branch, which has the Projects API and creates a workspace on its first start. Tangent lists everything it needs (Projects, saved pipelines, a shell on port 5173, a workspace that names the shell's tangle-oss bundle, an LLM key, VITE_ENABLE_TANGENT=true) and the one-command setup. The manual Create Workspace instruction shows the data to send. VITE_REMOTE_PIPELINES is marked as required for Tangent in the environment variable table.

start_local.sh needs bash, so on Windows oss:dev now asks for WSL or Git Bash.

How to test

Needs the backend's neurips-2026 branch running on port 8000, and tangent-shell cloned next to tangle-ui with nothing running on ports 5173 or 8787.

  1. From tangle-ui, run pnpm oss:dev with no LLM variables set. It installs dependencies, warns that no LLM credentials are set, starts Tangent (installing pi on the first run), and starts the app at http://localhost:3000.
  2. In the app, under Settings → Beta Features, turn on Projects, then Tangent. Click Tangent in the sidebar, type a request into Start a new session and press Enter. The project opens with Prime's greeting and a pipeline tab.
  3. With no key, the next system message ends with Tangent's "No API key is set …" reason (with tangent-shell Update the task/node info sheet/dialog #243) or a generic run error (without it).
  4. Stop everything, re-run with OPENAI_API_KEY=sk-... pnpm oss:dev and send a message. Prime answers.

Steps 1 to 3 were checked on a fresh install with an empty home directory and only public package registries, together with tangent-shell #242 and #243 and the neurips-2026 backend, whose seeded "Default" workspace names tangle-oss. The session started with the shell's tangle-oss bundle and showed the missing-key message. Step 4 wasn't run (no LLM key in that environment). pnpm typecheck, eslint and prettier pass on the changed files.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • Documentation update

Line Breakdown

Category Added Removed
Production code 64 36
Comments 15 12
Docs 20 4
Config / CI / tooling 1 1
Total 100 53

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Additional Comments

On a re-run, tangent-shell keeps its existing .env. A .env written by the old oss:dev (copied from .env.example) still carries the placeholder PI_PROXY_URL; delete tangent-shell/.env once to regenerate it.

🤖 Generated with Claude Code

@camielvs
camielvs requested a review from a team as a code owner December 2, 2026 22:51
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: fix/oss-dev-tangent-setup/4ddd719

@camielvs
camielvs force-pushed the fix/oss-dev-tangent-setup branch from 6b8a4a6 to d24764c Compare December 2, 2026 23:58
@camielvs
camielvs changed the base branch from fix/tangent-bundle-id to master December 2, 2026 23:59
@camielvs
camielvs force-pushed the fix/oss-dev-tangent-setup branch from d24764c to 474e3f1 Compare December 3, 2026 00:26
@camielvs
camielvs changed the base branch from master to fix/workspace-tangent-bundle-id December 3, 2026 00:27
@camielvs
camielvs force-pushed the fix/workspace-tangent-bundle-id branch from e55a78a to 9a27122 Compare December 3, 2026 16:53
Base automatically changed from fix/workspace-tangent-bundle-id to master December 3, 2026 17:07
… what Tangent needs

`pnpm oss:dev` failed on a fresh setup: it needed `pnpm install` before it
could start, the Tangent server refused to start without the `pi` binary
it never installed, it only passed LLM gateway credentials (not provider
keys), and it copied tangent-shell's .env.example placeholders into a live
.env. It now installs the app's dependencies first and starts Tangent with
tangent-shell's start_local.sh, which installs `pi` and wires the LLM key.
It also turns on saved pipelines, and warns up front when no LLM key is set.

The README lists everything Tangent needs, including saved pipelines and
an LLM key, and shows the one-command setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@camielvs
camielvs force-pushed the fix/oss-dev-tangent-setup branch from 474e3f1 to 4ddd719 Compare December 3, 2026 17:10
@camielvs

camielvs commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

oss-critical PR, with scope limited to OSS and readme. I'm pushing through without an external review.

@camielvs
camielvs merged commit 71dc261 into master Dec 3, 2026
18 checks passed
@camielvs
camielvs deleted the fix/oss-dev-tangent-setup branch December 3, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant