TOK-2: Drop filesystem token reads from the runtime #758
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#758
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a platform engineer, I want every runtime path that reads
~/.config/claude-hooks/tokens/*to swap togetAgentToken(), so that token bytes never traverse the filesystem at runtime — only the encrypted-secret resolver — and revoking a token atscope='global'invalidates it immediately.Acceptance criteria
Loader
readFileSync(token_file)outside the TOK-1 migration sweep.background/render-agent-env.ts/agent-env-sync) writes the resolved token into the per-agent.credentials.jsonfrom the secret resolver, not from the filesystem.Behaviour
scope='global'invalidates the next dispatch immediately (the dispatched agent's Forgejo client gets a 401, dispatch fails fast).Tests
scope='global', dispatch, assert the dispatch fails with a 401-shaped error.Out of scope
References
specs/config-to-db.md§ Story TOK-2.