You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent commands' request namespace keys on a label any OAuth MCP client can register #186
Found by the independent check of the v0.1.8 rebuild (#185, rows 15–24, finding F3). Low, and the same on the v0.1.7 stack; the rebuild carries it unchanged.
What happens.withAgentCliRequestNamespace moves an MCP session into the agent commands' request namespace lazurio:agent-cli and drops its hostedAppUrl when the session's client label is t3 agent cli (apps/server/src/lazurio/agentCliRequests.ts:24-28, label at apps/server/src/lazurio/agentCliConnection.ts:120). For an OAuth MCP client that label is its self-registered client_name: McpOAuth.register only trims it and caps its length (apps/server/src/auth/McpOAuth.ts:322-326), the token exchange stores it as the label (:546), and the authenticator passes it on (:616).
Why it matters. An approved OAuth client that registers as t3 agent cli shares the agent commands' namespace. If it can predict a send key, it can spend that key's thread-send request id first (the digest of the thread, the sender and the key, agentCliRequests.ts:57-75), and the agent's later t3 thread send --idempotency-key gets the replayed receipt and fails with idempotency_conflict. The impact is small: the client already needs the person's approval and holds thread_send. But the file's header says "every other MCP client keeps upstream's namespace", and that does not hold.
Possible fixes.
Recognise agent-command sessions by something OAuth cannot set, for example the subject the agent command's own session carries (agentCliConnection.ts:245-270 issues it through issueSession with MCP_CLIENT_SUBJECT, not through issueMcpClientSession).
Or make OAuth registration refuse the reserved name t3 agent cli; that would touch upstream's McpOAuth.ts and need an allowlist entry.
A test should register an OAuth client named t3 agent cli and show its session keeps upstream's namespace.
Activity