docs(agents): gh-via-1Password patterns + launchctl host setup#7
Merged
Conversation
Re-applies the local-vs-headless split that didn't make it into #6, and expands the host setup with launchctl coverage (the practical path for Dock/Spotlight launches and the no-checkout Clone-in-Volume flow): - Pattern A (local, recommended): resolve on host, forward GITHUB_TOKEN via remoteEnv. Documents the op-install/.zshrc/editor-launch gotchas. - launchctl setenv for GUI launches, with relaunch / not-persistent / session-wide caveats and an optional login LaunchAgent. - Pattern B (headless): in-container op read via ghTokenSecretRef + service account.
Drop the two-pattern framing and the headless/service-account (Pattern B) option; document just the local host-forward GITHUB_TOKEN approach.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Documents how
ghauthentication actually works underagentsv2.0.0 — thesetup turned out to be non-obvious in practice, so this captures it.
Re-applies the local-vs-headless split that didn't make it into feat(agents)!: authenticate gh via 1Password #6 (the
squash merged just before that commit, so
main's README still had the oldsingle-pattern version):
host, forward
GITHUB_TOKENviaremoteEnv, noghTokenSecretRef. Leadswith the key non-obvious fact: 1Password's desktop-app/Touch ID
integration does not work inside a container, so
opcan't run there.op readviaghTokenSecretRef+ a scoped service-account token.Expands the host setup with
launchctlcoverage — the practical path forDock/Spotlight launches and the no-checkout "Clone Repository in Container
Volume" flow, where you never launch the editor from a terminal:
launchctl setenv GITHUB_TOKEN "$(op read '…')", with the caveats that youmust relaunch the editor, it's cleared on logout/restart, and it's
session-wide.
caveat that
op readonly works non-interactively if 1Password canauthorize without a prompt).
opwithout a packagemanager, and
~/.zshrcvs~/.zsh_rc.Makes the generic Usage example neutral (no
ghTokenSecretRefbaked in)and points it at the two patterns.
Docs only — no feature behavior change.
Generated by Claude Code