Repository navigation
fix: let an agent's baked hooks key outrank a cached sign-in - #8109
Closed
speakeasyforgebot wants to merge 4 commits into
Closed
speakeasyforgebot wants to merge 4 commits into
speakeasyforgebot wants to merge 4 commits into
Conversation
A plugin's speakeasy.json can now mark its hooks_api_key as an agent's own key (agent_key). The hooks relay and the spool drain then use that key ahead of a cached speakeasy-hooks login, so an agent installed on a machine where a person signed in keeps its events under the agent. SPEAKEASY_AI_HOOKS_API_KEY still wins, and an org key from SPEAKEASY_AI_HOOKS_ORG_KEY is never treated as an agent's. The generator gains GenerateConfig.HooksKeyIsAgent to write the flag; published plugin output is unchanged. Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
Contributor
🦋 Changeset detectedLatest commit: 62edc82 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 14 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This was referenced Oct 26, 2026
Contributor
|
Folded into #8108, which now targets main as a single PR with all of this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DNO-1422
Summary
Mark a baked hooks key as an agent identity key with
agent_key, so it outranks a cached personal sign-in on both live events and offline replay. An explicit hooks API key still wins. An organization-key override replaces the baked key and clears the agent flag, allowing a matching personal cache to win; replay applies environment credentials only within their deployment.Include the agent flag in the publish snapshot so a change in credential identity regenerates the plugin configuration. Existing shared-key snapshots remain unchanged. Agent plugins skip automatic browser login, and the environment-overrides runbook describes the credential order and attribution consequences.
Motivation
An agent installed on a machine with a cached personal login must keep its own event identity. The explicit generator flag distinguishes an agent key from a shared organization key without guessing from the credential string.
No production generator sets
HooksKeyIsAgent: trueyet. The agent plugin generator in #8088 still needs to set it. The relay change also requires a hooks binary release and the follow-up version pin before existing installations receive it.This changes credential resolution and generated configuration, without adding an API or user action. Existing Platform MCP tools and shipped skills remain sufficient.
Narrated technical demo
Current head
62edc82f05259bbb626b683321c7d6a45f949f85: a local test-runner screen executes six existing relay tests freshly with-count=1, using synthetic fixtures and an isolated HTTP test server. It shows live agent-key priority, the explicit API-key override, config loading, offline replay and organization-key fallback, then cross-deployment isolation. The footage trims idle holds and includes synthesized narration.This is a technical test demonstration, not a deployed OpenClaw session or Agent Sessions attribution check. Delivery still needs the hooks release, version pin, and generator integration.
During preparation, one combined run's live-priority test saw three requests where it expected two. The failure did not recur in 30 isolated runs or 10 combined diagnostic runs; its cause remains unresolved. Temporary diagnostic logging was removed, and all six tests passed in the recorded fresh executions. No source code was changed.
demo-narrated.mp4