pinecallDocs
Running an agent / pinecall line

pinecall line

Ring your own phone and route it to the agent.

pinecall line [from <+number> | forget | claim | release] [agent.tsx] [--agent <name>]

A number rings in one place, and a team shares its numbers. With one developer that is not a decision: the first pinecall start to hold the agent answers its ring and you never learn the word. With three it used to be whoever restarted last — so you would dial the number to test your change and be answered in a colleague's scrollback, with nothing on either screen saying so.

Say which phone is yours, once. Then every call you make lands in your own agent: no claim, no coordination, three of you testing at the same time.

It works on the production number, and that is the usual case. A call from your phone to a number that answers in production reaches your sandbox copy while you are holding that agent — your class, your tools, your terminal, a sandbox log marked diverted_from: production — and every other caller reaches production exactly as before. Stop pinecall start, or pinecall line forget, and your own calls go back to production. That is how a team tests on the line its customers use, with one number: a sandbox number is optional, and when an org has one, your phone reaches your copy there too. The gateway's worker asks for this on every production ring (GET /v1/agents/{slug}/rings-for), so nothing here knocks at that endpoint.

Terminal
$ pinecall line from +59899111111
calls from +59899111111 reach this terminal

A phone is a person's and not an agent's, so it works in whatever directory you are standing in and on every agent you hold. It is said in the sandbox and kept under the gateway's URL (calling in ~/.pinecall/session.json) and re-sent by every pinecall start when it starts — the gateway keeps it beside its live table and not in a row, because it is only meaningful next to a socket: a developer running nothing has no corner for a call to land in. forget undoes it. claim, release and the bare line are about one agent: at a project's root with several, name it with --agent. The gateway refuses a number that is not in E.164 form, with the shape in the sentence, and refuses an org's own key outright: it names nobody, so there is no their own agent to reach. Nothing is checked in the terminal first — what you see is what the gateway answered.

And for a call from a number nobody said was theirs — a customer, a colleague's phone — there is the line:

Terminal
$ pinecall line
rings in berna@clinica.test · `pinecall line from <+your-number>` routes yours, or `claim` takes it

$ pinecall line claim
rings in this terminal · also running: berna@clinica.test

release gives it up, and whoever else is still running the agent picks it up — which is also what happens on its own when the terminal holding it closes. A claim on an agent this terminal is not running is refused: a ring lands on the line, so a corner with no app in it would take the call and drop it. Production has one corner and the platform holds it, so there is nothing to claim there — only your own phone is diverted, as above; pinecall start prints the line only for an agent that declares a number.