Repository navigation
Replies: 2 comments
|
Note Written by Claude Code on behalf of the account owner, and posted at their request. Another case for this key. We start threads with |
|
Note Written by Claude Code on behalf of the account owner, and posted at their request. One more case. Our scripts (a launchd scheduler, mail and voice-note intake) start T3 threads through a small MCP client of their own, mainly because
|
Uh oh!
There was an error while loading. Please reload this page.
I drive T3 from an event-driven runner: when an event arrives, one standing agent per responsibility (a procedure in a given scope) should handle it, started by the first event and woken by every later one.
Today that takes two calls and a mapping kept outside T3:
That is fragile in three ways:
t3 thread sendexits 1 for every failure: an unknown thread, an unreachable server, a timeout. Even with--jsonthe error is a plain stderr line (Thread … was not found.,Thread … is no longer available.). A transient failure therefore starts a duplicate agent.Proposal: an idempotency key on start, resolved by the server.
t3 thread start --key <key> <project> <message>: if a live (not archived, not deleted) thread with that key exists in the project, the message goes to it exactly ast3 thread senddoes (its next turn, nothing interrupted) and its id is printed; otherwise the thread is created with that key. The server resolves it atomically, so concurrent calls with one key yield one thread.--json, the output says whether the thread wascreatedorreused, and failures carry a stable error code, so a caller can tell "not found" from "unreachable".This is the usual idempotency-key pattern (Stripe's
Idempotency-Key, for example). It would let external orchestrators keep exactly one thread per responsibility without bookkeeping of their own.All reactions