Ankit Patel
WritingPapersLabsAboutContact
Engineering Org & Leadership··3 min read·124 views

Before the Assistant Says Done

In March I built a bridge to carry a local Claude Code session into Slack so another engineer could join from a phone. Getting messages to the phone was the easy half. Once a teammate posts in a shared thread, a chat reply becomes an instruction executing against somebody's live developer workspace. Two engineering questions surface immediately: whose identity is making that request, and what side effects can the assistant commit on their behalf?

Building that Slack bridge sharpened a boundary I explored in a March architecture note on sub-agents asking for more authority. An agent inspecting an order discovers it needs to flip a refund-review flag. Explaining why the flag should change takes language skill. Granting permission takes an authorization service. Once software crosses from summarizing text to mutating records, the chat transcript is the wrong place to enforce access control.

OpenAI's January guide to building agents frames agents around multi-step tool selection where messy inputs defeat static rule trees. That division of labor makes sense to me: let the language model resolve ambiguity and gather missing fields, then hand execution to deterministic application code that enforces permissions and verifies state transitions.

Rescheduling an appointment shows where conversation ends and distributed systems begin. A customer writes, "Move it to Tuesday afternoon." Resolving which booking they mean, which Tuesday applies, and which open slots fit is a great job for a model. Agreeing in chat still hasn't moved the booking, which is the operational trap I wrote about in A Chat Window Can Make a Promise when conversational fluency gets ahead of committed backend state.

The part that needs a system

Before touching the calendar store, the service has to echo the exact booking and target slot for confirmation. After approval, the backend writes to the system of record and reads back the committed state. When a slot vanishes mid-flight, the caller needs an honest fallback rather than a cheerful lie. When a connection drops right after commit, recovery has to reconcile the pending request ID before telling the user whether the move succeeded.

None of that plumbing looks exciting in an executive demo. Durable idempotency keys, pending-intent records, and read-after-write verification matter far more to customer trust than warmer prose. In my Slack tool the risk was shared workspace access. On a customer-facing mutation, the risk is silent non-execution or double execution.

Identity has to survive across hops too. In Uber's May engineering write-up on agent identity, an on-call engineer triggers workflows spanning multiple internal agents before a tool touches infrastructure. Early prototypes collapsed downstream calls into a generic service account, erasing who started the chain and what they authorized. Uber addressed that gap by registering agent identities, minting short-lived per-hop tokens, and propagating the actor chain end to end.

Read access to a schedule never implies write access to modify it, and approval to move Tuesday's slot never authorizes edits elsewhere on a customer's account. When an exception falls outside allowed policy, halting cleanly with an explicit handoff record beats improvising.

I would fund that unglamorous state-and-identity layer ahead of adding ten more conversational tools. Otherwise a slick conversational front door just feeds broken state into phone queues and manual support tickets.

Counting the change as done

In a coding agent runtime like my Slack bridge, a post-condition gate checks test coverage on every modified file alongside exit status and working-tree state before letting a run mark itself finished:

interface RunEvidence {
  exitCode: number;
  modifiedFiles: string[];
  coveredByTests: Set<string>;
  workingTreeClean: boolean;
}
function verifyCompletion(ev: RunEvidence): "completed" | "needs_verification" {
  const allCovered = ev.modifiedFiles.every((f) => ev.coveredByTests.has(f));
  return Object.is(ev.exitCode, 0) && allCovered && ev.workingTreeClean ? "completed" : "needs_verification";
}

For any workflow that mutates state, completion means the intended write committed once, the user saw the verified outcome, and support agents see the exact same pending or failed record when something blocks. Start with one narrow action backed by one source of truth and a tested disconnect recovery path. Which failure mode shows up more often in your agent reviews right now: over-broad tool permissions or unverified writes?

Continue in Engineering Org & Leadership