Add multi-agent support for named agents per channel#19
Open
ZoeFridler wants to merge 20 commits intompociot:mainfrom
Open
Add multi-agent support for named agents per channel#19ZoeFridler wants to merge 20 commits intompociot:mainfrom
ZoeFridler wants to merge 20 commits intompociot:mainfrom
Conversation
… path - Persist agent configs to agents.json so they survive restarts - Bypass permission prompts for agent sessions (autonomous mode) - Fix hardcoded permission MCP server path to use relative path - Upgrade SDK to 1.0.128 for Node 22 compatibility - Add agent announcement on creation in main conversation - Add agents.json to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type "help" or "commands" in DMs to see the full command reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sessions with a sessionId are saved to sessions.json and restored on startup, so agents remember their conversation history across restarts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Status message now updates every 5s showing elapsed time and what the agent is doing (Thinking/Working/Responding + tool name), so you can tell if it's active or stuck. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use `model <agent> sonnet` for fast responses or `model <agent> opus` for smarter reasoning. Shown in agent list and status. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If asked in the main conversation, reply there. If asked in a thread, reply in the thread. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents take turns working on a shared task, each responding to the other until one signals DONE or the 10-turn limit is reached. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Global rules are prepended to every agent's identity prompt, before their individual rules. Persisted to global-rules.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When exact command syntax doesn't match, the bot now understands natural language like "add a global rule to not delete files", "make lina fast", "show me my agents", "how is lina doing", etc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
"lina do that", "tell lina to check the logs", "ask lina about the auth module" all work now without needing @lina. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each agent is auto-assigned a unique color from a 10-color palette. Messages from agents display with a colored sidebar via Slack attachments API. Colors are applied to greetings, responses, tool output, collaboration, and agent-to-agent queries. Existing agents without colors get auto-assigned on load. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Edit diffs now show removed code with a red sidebar and added code with a green sidebar (like GitHub). Bash commands use a dark sidebar. New file creation uses a blue sidebar. Search tools (Glob/Grep) get a search icon. All via Slack attachments API for visual distinction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The natural language parser matched "remove" anywhere in text as a remove_agent command, so "lina ... remove comments" deleted the agent. Fixed by: 1. Moving "agent name at start" check to the top of NLP parser — messages starting with an agent name are always sent to that agent 2. Requiring "agent" keyword near "remove/delete" for destructive cmds 3. Adding confirmation step for agent removal (30s timeout) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two fixes for the "Could not process image" error: 1. Images are now embedded as base64 directly in the prompt instead of telling Claude to use the Read tool. This prevents image data from being stored in the session history, which would corrupt the session on resume when the API can't reprocess stale images. 2. Added auto-retry in streamQuery — if a resumed session fails with an image/invalid_request error, automatically clears the corrupted session and retries fresh instead of crashing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The base64 approach just dumped unreadable text into the prompt. The Read tool is the correct way for Claude to view images. The auto-retry in claude-handler.ts handles corrupted sessions from stale images on resume. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handles case where user sends "lina" with a file attachment but no additional text. Previously fell through to the regular handler which requires a working directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
@name <message>or broadcast to all with@all <message>memory_store,memory_retrieve)Changes
src/types.ts— AddedAgentConfigandParsedCommandinterfacessrc/agent-manager.ts(new) — Agent CRUD, command parsing, and directory resolutionsrc/claude-handler.ts— Added agent session key/get/create methodssrc/slack-handler.ts— Added agent command routing, handler methods, extractedexecuteQuery()helper from the streaming loop for reuse by both regular messages and agent messagesCommands
create agent <name> on <path>remove agent <name>list agents@<name> <message>@all <message>Test plan
npm run dev— bot starts without errorscreate agent linux-agent on linux-metrics— agent created with resolved pathlist agents— shows the agent@linux-agent what files are in src/— responds with[linux-agent]prefixcreate agent slack-agent on claude-code-slack-bot— second agent created@all describe your project— both agents respond concurrentlyremove agent linux-agent— agent removed🤖 Generated with Claude Code