feat(deepagents): add context.offload hook event and global scope for rules/subagents/skills - #1836
Merged
dyoshikawa merged 2 commits intoJun 10, 2026
Conversation
… rules/subagents/skills
Resolves the remaining gaps in the deepagents (dcode) integration:
- Add a canonical `contextOffload` hook event mapped to dcode's `context.offload`
(dispatched by dcode alongside `context.compact`), wired into the deepagents
hook event set and name maps. Other adapters are unaffected.
- Honor global scope for rules, subagents, and skills: dcode reads user-level
context/agents/skills from `~/.deepagents/<agent_name>/{AGENTS.md,agents,skills}`
(default agent_name `deepagents`). getSettablePaths now emits
`~/.deepagents/deepagents/...` in global mode, and the rules/subagents/skills
processors mark deepagents `supportsGlobal: true`. Project behavior is unchanged.
(The hooks project-vs-global concern from the issue was already resolved: the
hooks processor emits deepagents hooks global-only to ~/.deepagents/hooks.json.)
Tests, processor target enumerations, and the supported-tools matrix updated.
Closes #1815
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…le comment Address review findings on PR for #1815: - Add deepagents to the global-mode e2e happy-path matrices for rules, subagents, and skills (now that they support global scope), asserting output under ~/.deepagents/deepagents/{AGENTS.md,agents/planner/AGENTS.md,skills/...}. - Update the now-stale fromRulesyncRule comment to mention the global path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 31, 2026
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
Resolves the remaining gaps in the deepagents (dcode) integration described in #1815, verified against the deepagents-code source.
context.offload hook event
dcode dispatches a
context.offloadhook (alongsidecontext.compact) that rulesync had no canonical mapping for. Add a canonicalcontextOffloadevent mapped tocontext.offload, wired intoDEEPAGENTS_HOOK_EVENTSand the deepagents event name maps. The change is additive — no other adapter's event set includescontextOffload, so they are unaffected.Global scope for rules / subagents / skills
dcode reads user-level context, subagents, and skills from
~/.deepagents/<agent_name>/{AGENTS.md,agents/,skills/}(defaultagent_name=deepagents), but the rules/subagents/skills adapters hardcoded project paths and the processors marked themsupportsGlobal: false. Now:getSettablePaths({ global: true })emits~/.deepagents/deepagents/{AGENTS.md,agents,skills}(home resolved via outputRoot).supportsGlobal: true.Hooks (already resolved)
The issue's hooks concern — a project
.deepagents/hooks.jsonthat dcode never reads — is already addressed on main: the hooks processor emits deepagents hooks global-only to~/.deepagents/hooks.json(supportsProject: false, supportsGlobal: true). No change needed there.Tests / docs
Unit tests for the new event mapping and global paths, updated processor target-enumeration tests, and the
supported-tools.mdmatrix (rules/subagents/skills gain 🌏).pnpm cicheckfully green (6225 tests).Closes #1815
🤖 Generated with Claude Code