OpenCode plugin for async background delegation with context persistence. Operations teams can run research tasks while continuing other work. Integrates with Claude Code agents, supports TypeScript.
git clone https://github.com/kdcokenny/opencode-background-agents.gitopencode-background-agents is an OpenCode plugin that enables asynchronous background task delegation with automatic result persistence to disk. It solves the context-window problem: when Claude's context fills up and compaction occurs, research results are typically lost. This plugin fires off research tasks as background delegations, lets you continue brainstorming or coding without blocking, and automatically saves results as markdown files. When context compacts, the AI knows exactly where to retrieve past research. Tools include delegate() to launch tasks, delegation_read() to retrieve results, and delegation_list() to scan prior work—ideal for operations teams and developers who need continuity across long sessions.
[{"step":"Install the OpenCode plugin in your Claude Code environment. Run `pip install opencode` and verify installation with `opencode --version`.","tip":"Ensure you have the latest version of Claude Code (v3.5 or higher) for full TypeScript support."},{"step":"Prepare your task with clear context. Use the prompt template to structure your request, including [RESEARCH_TASK], [CONTEXT_DATA], [PRIORITY_LEVEL], and [DEADLINE].","tip":"Attach relevant files or links as context data to avoid ambiguity. For example, include competitor websites, product docs, or internal notes."},{"step":"Delegate the task to a background agent using the OpenCode CLI. Example: `opencode run --task \"Research Acme Corp's latest product launches\" --context ./acme-notes.md --priority high --deadline 2024-10-15`.","tip":"Use the `--format` flag to specify output format (e.g., markdown, JSON) if your workflow requires structured data."},{"step":"Monitor progress via the OpenCode dashboard or CLI. Use `opencode status` to check active tasks and `opencode logs [TASK_ID]` to review agent actions.","tip":"Set up notifications (e.g., Slack, email) for task completion to avoid manual checks."},{"step":"Review and act on the agent's output. Validate findings against your internal data sources and integrate insights into your workflow.","tip":"For critical decisions, cross-check agent findings with a human review to ensure accuracy."}]
Run extended research tasks while continuing code review or architecture discussion
Preserve research across context compaction events within a session
Delegate read-only exploratory work to background sub-agents
Scan and retrieve past delegations by title and summary without losing context
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/kdcokenny/opencode-background-agentsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the OpenCode plugin to delegate a background research task to a Claude Code agent. Task: [RESEARCH_TASK]. Provide context: [CONTEXT_DATA]. Set priority to [PRIORITY_LEVEL] and include a deadline of [DEADLINE]. Return a summary of findings in [FORMAT] when complete.
``` **Background Agent Task Completed: Competitor Analysis for Acme Corp** **Task**: Research Acme Corp's latest product launches, pricing strategies, and customer sentiment for Q3 2024. **Context**: Acme Corp is our primary competitor in the cloud storage space. We need this data to refine our upcoming product roadmap. **Priority**: High | **Deadline**: October 15, 2024 | **Agent**: claude-code-3.5 **Findings Summary**: 1. **Product Launches**: - Acme Cloud 2.0 released on August 22, 2024, with a new "AI Insights" feature (priced at $49/month for Pro tier). - Competitor also launched a free tier with 5GB storage, targeting SMBs. 2. **Pricing Strategy**: - 15% price increase across all tiers in September 2024. - Introduced "Enterprise Plus" plan at $999/month with 10TB storage and 24/7 support. 3. **Customer Sentiment (G2 Reviews)**: - 4.2/5 stars (down from 4.5 in Q2). - Top complaints: "UI feels outdated" and "customer support slow to respond." - Praise for "reliability" and "integration with third-party apps." **Recommendations**: - Accelerate our "Modern UI" project to address competitor's weakness. - Consider a mid-tier plan between $29-$39 to compete with free tier. - Monitor Acme's Enterprise Plus tier for potential enterprise wins. **Next Steps**: - Share findings with Product Team by EOD. - Schedule a strategy session with Marketing to discuss pricing adjustments. ```
AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Agentic AI Workflow platform
The AI automation platform built for everyone
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan