Versions: @opencomputer/cli 0.5.1, @opencomputer/agent 0.4.1.
A connection declared per the secrets docs:
const github = defineConnection({
id: "github-api",
origin: "https://api.github.com",
methods: ["GET"],
pathPrefix: "/repos/",
headers: {
Authorization: bearer(useSecret("GITHUB_TOKEN")),
Accept: "application/vnd.github+json",
},
});
Every github.fetch("/repos/...") from a tool returns 403 even with a valid token (the same token + path returns 200 via curl locally). GitHub rejects any request without a User-Agent header with 403, and the managed egress apparently forwards none.
Workaround
Adding a static header to the connection fixes it:
"User-Agent": "opencomputer-sdk-watcher",
Suggestion
Have the egress send a default User-Agent (e.g. opencomputer-egress/<version>) when the connection doesn't declare one — a missing UA yields confusing 403s that look like auth/permission failures, and GitHub is about as common a first target as it gets. Worth a note in the secrets/connections docs either way.
🤖 Filed with Claude Code
Versions:
@opencomputer/cli0.5.1,@opencomputer/agent0.4.1.A connection declared per the secrets docs:
Every
github.fetch("/repos/...")from a tool returns 403 even with a valid token (the same token + path returns 200 via curl locally). GitHub rejects any request without aUser-Agentheader with 403, and the managed egress apparently forwards none.Workaround
Adding a static header to the connection fixes it:
Suggestion
Have the egress send a default
User-Agent(e.g.opencomputer-egress/<version>) when the connection doesn't declare one — a missing UA yields confusing 403s that look like auth/permission failures, and GitHub is about as common a first target as it gets. Worth a note in the secrets/connections docs either way.🤖 Filed with Claude Code