Repository navigation
Description
Summary
Issue ephemeral capability tokens scoped to a correlation_id (one workflow) with a TTL matching the workflow deadline, replacing permanent permission grants for agent-to-agent calls. When the workflow completes, the token expires. Bounds the blast radius of a compromised agent to its active workflows, not its permanent permission set.
Context
docs/planning/TARGET_ARCHITECTURE.md §"Zero-Trust Agent Network" describes the destination: today agent_permissions correctly enforces default-deny at the MCP layer, but a granted permission is permanent. A compromised agent can replay its credentials across all workflows it was ever allowed to participate in.
Workflow-scoped tokens are additive — they layer on top of agent_permissions, they don't replace it. The permission table answers "is this pair ever allowed?"; the token answers "is this pair allowed right now, for this workflow?"
Sequencing: both original gates are discharged (closed 2026-07-08) — see the Technical Notes. correlation_id is now specified, and the pull direction that determines this feature's shape is committed. What remains is prioritization, not a dependency.
Acceptance Criteria
- Design document under
docs/planning/covering:- Token format (JWT? opaque? signed envelope?) and where the signing key lives
- Issuance trigger — when does Agent A's call to Agent B mint a token; when does the token reach Agent B
- TTL strategy — workflow deadline, max ceiling, refresh policy if any
- Revocation — explicit
correlation_idblock-list, or expiry-only - Audit — every issuance and use logged via the existing audit chain
- Prototype on the MCP path:
chat_with_agentmints a token tied to the currentcorrelation_id, target agent validates it - Permanent
agent_permissionsgrants remain the prerequisite — a missing permission denies the call before a token is ever issued - Demo: revoke a workflow mid-execution; subsequent agent-to-agent calls fail; calls outside that workflow continue working
Technical Notes
Needs message-envelopeDone —correlation_idsemantics from spec: message envelope payload schema (pull coordination) #945 to land first (or to be designed in parallel).docs/planning/MESSAGE_ENVELOPE_SCHEMA.mdspecifiescorrelation_idas a required uuid that "groups all messages of one workflow" (root message:correlation_id == id). That is exactly the scoping identifier this issue needs for TTL and revocation.- Token validation belongs on the MCP server side — same enforcement layer as
agent_permissionstoday. - Audit hash chain (already in place for SEC-001) gives free tamper-evidence on token issuance/use records.
Defer to after experiment: pull-coordination pilot — route MCP chat_with_agent through the agent queue #946 decision gate — if message-passing wins, this changes shape; if planned path wins, this is implemented on the RPC path.Resolved: experiment: pull-coordination pilot — route MCP chat_with_agent through the agent queue #946 closed and the pull / work-stealing direction is committed (TARGET_ARCHITECTURE.mdv2, umbrella feat: pull / work-stealing coordination (push→pull dispatch) #1081, Phases 0–3 done), so this lands on the queue/envelope path, not the RPC path.- Sequencing consideration, not a blocker: feat: pull / work-stealing coordination (push→pull dispatch) #1081 Phase 4 (sync edge adapter for
/chatandchat_with_agent) is not started, and that is the carrier an agent→agent token would ride. Design against Phase 4's shape rather than today's synchronous MCP call.
🤖 Generated with Claude Code
Activity
docs(target-arch): cross-reference tracking issues for open questions
Keesan12 commentedon May 26, 2026
This looks like a coordination or scheduling contract issue. I’d make the envelope or schedule semantics visible in one place before layering on more behavior. The cleanest fix is usually to place the budget or attribution check before the expensive work, so the next retry has a clear signal instead of a surprise. That keeps the fix reviewable and avoids trading one hidden failure for another. If this is useful, I can help turn it into a compact repro checklist or PR shape.
Release: v0.8.5 (#1781)
obasilakis commentedon Aug 6, 2026
Updated the body to drop two stale blockers. Both were named in the original description (@vybe) and both closed on 2026-07-08:
docs/planning/MESSAGE_ENVELOPE_SCHEMA.md.correlation_idis specified as a required uuid that groups all messages of one workflow (root message:correlation_id == id), which is precisely the scoping identifier this issue's TTL and revocation need.TARGET_ARCHITECTURE.mdv2, umbrella feat: pull / work-stealing coordination (push→pull dispatch) #1081, Phases 0–3 done). The body's conditional therefore resolves toward the queue/envelope path, not the RPC path.Original text kept as strikethrough rather than deleted, so the reasoning stays legible.
Added in its place as a note, not a new gate: #1081 Phase 4 (sync edge adapter for
/chatandchat_with_agent) is not started, and that is the carrier an agent→agent capability token would ride — worth designing against Phase 4's shape rather than today's synchronous MCP call.No change to scope or acceptance criteria. Still P3
status-incubating— nothing blocks it now, it's a prioritization call.feat(agents): ephemeral ghost agents — budgeted hard-discard lifecycl…
vybe commentedon Sep 24, 2026
Ruling 2026-09-24: stays incubating as stage 2 of the permission-layers plan. A workflow-scoped token is one implementation option for per-playbook grants (trinity-enterprise#590), not their prerequisite — the platform fronts every agent-to-agent call, so the grant can be checked server-side on the mediated call. Cross-referenced on #590.