Add safe daemon-backed agent messaging - #164
Closed
sethkarten wants to merge 4 commits into
Closed
Conversation
Contributor
Author
|
Superseded by #207, which combines safe daemon-backed agent messaging with read-only agent observation into one user orchestrator PR. |
Contributor
Author
|
Closing in favor of #207, which combines this daemon-backed agent messaging work with read-only observation and orchestration heartbeat support. |
zhengr
pushed a commit
to zhengr/prime-agent
that referenced
this pull request
Aug 8, 2026
…ntellect-ai#164) * fix(ai): remove global process.env.ANTHROPIC_API_KEY deletion The code was deleting process.env.ANTHROPIC_API_KEY to prevent the SDK from using it when OAuth tokens were provided. However, this was a global mutation that affected the entire Node.js process, causing the API key to be unavailable after the first prompt. The Anthropic SDK constructor already handles credential selection via parameters (apiKey: null, authToken: token for OAuth vs apiKey: key for regular keys), so the environment variable deletion was unnecessary. * Update CHANGELOG.md for API key fix
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.
Summary
prime-agent daemon send [--from <session>] [--steer|--follow-up] <target> <message>for user/operator sends.prime-agent daemon agent-messages status|pause|resume|clear <session>as an explicit safety switch.agent-message, importable asagent_message, with:await agent_message.list_agents()await agent_message.send(target, message, mode="auto")from.Safety guardrails
*,all,broadcast) are rejected.source: agent_messagein both receipt and delivered prompt text.agent-messages pauseblocks further sends until resumed.agent-messages clear <session>clears one explicitly named session queue and resets that session's rate bucket.Validation
packages/coding-agent:npx tsx ../../node_modules/vitest/dist/cli.js --run test/agent-session-bus.test.ts test/kernel-agent-message-skill.test.ts test/builtin-skills.test.ts test/daemon-command.test.ts test/daemon-session-id.test.ts test/agent-connection-daemon.test.tspackages/coding-agent:npx tsgo --noEmit --pretty falsenpm run checkpackages/coding-agentafter building workspace dist for extension dynamic imports:npx tsx ../../node_modules/vitest/dist/cli.js --runnpm run buildnpm run checkpassed on commit53d61ed7.Isolated live smoke
PI_CODING_AGENT_DIR, temporaryPI_SESSION_DIR, and temporary cwd.alphaandbeta.alpha -> betathroughdaemon send --from.source: agent_message,from.activeSessionId == alpha, andtarget.activeSessionId == beta.Agent-to-agent message received.and the message payload.1 -> 1), so no loop/storm occurred.Known gaps