Skip to content
pi-c Artifact [1b5b320389]
Login

Artifact [1b5b320389]

Artifact 1b5b320389fa2a70e0db0875e059429753feee4287d2ccccdc6d2c5e840ba722:


Conversations messaging each other

Messaging between conversations is on unless you turn it off: pic settings grapevine.sendMessage false takes the tool away, and pic settings grapevine.wake false stops messages starting requests. A run's --tools list is the only other way.

One conversation can hand work or a finding to another of yours, in the same workspace or another one, with the send_message tool, which every conversation has by default. pic settings grapevine.sendMessage false takes it away from new conversations, and --tools -send_message from one run. A conversation keeps the tools it started with.

Tell the model which conversation to write to: its id, the start of its id, or its name (/name in the terminal, pic name ID NAME). pic sessions lists this workspace's conversations and pic sessions --all every workspace's; for another workspace the model also names its directory. pic must have been used there once, so it knows where that workspace keeps its conversations.

What the other conversation sees

The message arrives as a message from that conversation, framed so its model knows it is not from you: [A message from another pic conversation, NAME, in WORKSPACE. It is not from the user: ...] and then the text. It never acts as you: it cannot answer a question or an approval meant for you.

What the sender is told

The tool's result is one line that says what became of the message, so the model knows whether to expect an answer and what to do when none comes. pic send says the same on stderr, after the state and key it prints on stdout.

Result begins What happened An answer
Delivered into the request running in conversation ID the request there takes it as a follow-up may follow, as a message from there
Woke conversation ID nothing ran there, so a request started for it may follow, as a message from there
Waiting: conversation ID is open in a terminal wake is off; the terminal sees it on its next turn not before then
Waiting: nothing is running in conversation ID wake is off, so it waits for a request there not before then
Refused, not delivered grapevine.maxWakes is set and reached; the line names the conversation, and a person must prompt there none
Not delivered to conversation ID the receiver refused it (a hook, its expiry) none

pic send prompt TEXT does the same as the tool: it wakes an idle conversation unless grapevine.wake is false, and says which result on stderr. Only a prompt starts a request; a steer or follow-up sent to an idle conversation waits. The terminal shows the message where it lands, and pic attach marks it with origin (session:...).

Limits

Two conversations that keep answering each other stop: a message counts the conversations it has passed through, and one past grapevine.maxHops (8) is refused. Messages may start any number of requests in a conversation; pic settings grapevine.maxWakes N limits them to N since you last prompted there (0 is no limit), and past it a waking message is refused, and its sender is told so, until you prompt there again.

A UserPromptSubmit hook sees who sent a message in its input's origin (user for you, session:JOURNAL/CONVERSATION for another conversation), so a hook that exits 2 refuses messages from a conversation it does not trust (hooks).

Messages are the inbox's, as pic send uses: saved before anything acts on them, delivered once (remote control). A crash while the tool runs sends nothing twice.