Bug Description
The @tarquinen/opencode-dcp plugin crashes with a TypeError when I ask OpenCode to search for a skill. The error occurs because the plugin attempts to read msg.info.time.created, but the message structure provided during this specific tool call seems to lack the info or time object, leading to an undefined evaluation in the isMessageCompacted function.
Expected Behavior
The skill search should complete successfully, and the DCP plugin should either gracefully handle messages missing the info.time.created property or correctly parse the tool call's message structure without crashing OpenCode.
Debug Context Logs
[
{
"role": "user",
"time": 1775321784666,
"parts": [
{
"type": "text",
"text": "quante skill hai?\n\n<dcp-message-id>m0001</dcp-message-id>"
}
]
},
{
"role": "user",
"time": 1775321784711,
"parts": [
{
"type": "text",
"text": "[analyze-mode]\nANALYSIS MODE. Gather context before diving deep:\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, AST-grep, LSP for targeted searches\n\nIF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:\n- **Oracle**: Conventional problems (architecture, debugging, complex logic)\n- **Artistry**: Non-conventional problems (different approach needed)\n\nSYNTHESIZE findings before proceeding.\n---\nMANDATORY delegate_task params: ALWAYS include load_skills=[] and run_in_background when calling delegate_task.\nExample: delegate_task(subagent_type=\"explore\", prompt=\"...\", run_in_background=true, load_skills=[])\n\n---\n\n<available-skills>\nUse the use_skill, read_skill_file, run_skill_script, and get_available_skills tools to work with skills.\n\n- design-category-pointer: Pointer to a library of 62 specialized Design skills. Use when working on design-related tasks.\n- web-dev-category-pointer: Pointer to a library of 56 specialized Web Dev skills. Use when working on web-dev-related tasks.\n- testing-category-pointer: Pointer to a library of 8 specialized Testing skills. Use when working on testing-related tasks.\n- security-category-pointer: Pointer to a library of 54 specialized Security skills. Use when working on security-related tasks.\n- automation-category-pointer: Pointer to a library of 110 specialized Automation skills. Use when working on automation-related tasks.\n- git-category-pointer: Pointer to a library of 22 specialized Git skills. Use when working on git-related tasks.\n- ai-ml-category-pointer: Pointer to a library of 103 specialized Ai Ml skills. Use when working on ai-ml-related tasks.\n- context-management-category-pointer: Pointer to a library of 17 specialized Context Management skills. Use when working on context-management-related tasks.\n- agents-category-pointer: Pointer to a library of 7 specialized Agents skills. Use when working on agents-related tasks.\n- architecture-category-pointer: Pointer to a library of 27 specialized Architecture skills. Use when working on architecture-related tasks.\n- game-dev-category-pointer: Pointer to a library of 98 specialized Game Dev skills. Use when working on game-dev-related tasks.\n- business-category-pointer: Pointer to a library of 40 specialized Business skills. Use when working on business-related tasks.\n- mobile-category-pointer: Pointer to a library of 7 specialized Mobile skills. Use when working on mobile-related tasks.\n- backend-dev-category-pointer: Pointer to a library of 64 specialized Backend Dev skills. Use when working on backend-dev-related tasks.\n- devops-category-pointer: Pointer to a library of 106 specialized Devops skills. Use when working on devops-related tasks.\n- database-category-pointer: Pointer to a library of 47 specialized Database skills. Use when working on database-related tasks.\n- programming-category-pointer: Pointer to a library of 17 specialized Programming skills. Use when working on programming-related tasks.\n- tooling-category-pointer: Pointer to a library of 9 specialized Tooling skills. Use when working on tooling-related tasks.\n- writing-category-pointer: Pointer to a library of 16 specialized Writing skills. Use when working on writing-related tasks.\n- code-review-category-pointer: Pointer to a library of 7 specialized Code Review skills. Use when working on code-review-related tasks.\n- blockchain-category-pointer: Pointer to a library of 1 specialized Blockchain skills. Use when working on blockchain-related tasks.\n- data-science-category-pointer: Pointer to a library of 9 specialized Data Science skills. Use when working on data-science-related tasks.\n</available-skills>\n\n<dcp-message-id>m0002</dcp-message-id>"
}
]
},
{
"role": "assistant",
"time": 1775321784740,
"tokens": {
"input": 70222,
"output": 300,
"reasoning": 0,
"cache": {
"write": 0,
"read": 0
}
},
"parts": [
{
"type": "text",
"text": "Operando in **diagnostic mode**.\n\nAnalizzo le skill disponibili nel tuo ambiente di lavoro. Ecco il riepilogo:\n\n## Totale Skill: 24 category-pointer\n\nQueste skill sono puntatori a librerie specializzate. Ecco la distribuzione:\n\n| Categoria | Numero Skill Specializzate |\n|-----------|---------------------------|\n| Automation | 110 |\n| AI-ML | 103 |\n| Game Dev | 98 |\n| DevOps | 106 |\n| Design | 62 |\n| Backend Dev | 64 |\n| Database | 47 |\n| _Uncategorized | 457 |\n| Security | 54 |\n| Web Dev | 56 |\n| Business | 40 |\n| Architecture | 27 |\n| Context Management | 17 |\n| Programming | 17 |\n| Writing | 16 |\n| Tooling | 9 |\n| Data Science | 9 |\n| Testing | 8 |\n| Agents | 7 |\n| Mobile | 7 |\n| Code Review | 7 |\n| Git | 22 |\n| Blockchain | 1 |\n\n---\n\n**Totale skill specializzate sottostanti**: ~1.400+ skill\n\nLe **category-pointer** sono metaskill che puntano a librerie di skill più specifiche. Quando lavori su un task di un determinato dominio, carichi la category-pointer corrispondente e questa ti dà accesso alle skill specializzate per quel settore.\n\n<dcp-system-reminder>\nEvaluate the conversation for compressible ranges.\n\nIf any messages are cleanly closed and unlikely to be needed again, use the compress tool on them.\nIf direction has shifted, compress earlier ranges that are now less relevant.\n\nThe goal is to filter noise and distill key information so context accumulation stays under control.\nKeep active context uncompressed.\n\nCompressed block context:\n- Active compressed blocks in this session: 0 (none)\n- If your selected compression range includes any listed block, include each required placeholder exactly once in the summary using `(bN)`.\n</dcp-system-reminder>\n\n<dcp-message-id>m0003</dcp-message-id>"
}
]
},
{
"role": "user",
"time": 1775322532241,
"parts": [
{
"type": "text",
"text": "Carica le skill di laravel\n\n<dcp-message-id>m0004</dcp-message-id>"
}
]
}
]
Tool Call Details
The crash happens exactly when OpenCode triggers a tool call to search for a skill.
Error stack trace snippet:
TypeError: undefined is not an object (evaluating 'msg.info.time.created')
at isMessageCompacted (/home/[YOUR_USER]/.cache/opencode/node_modules/@tarquinen/opencode-dcp/dist/lib/state/utils.js:4:18)
at countTurns (/home/[YOUR_USER]/.cache/opencode/node_modules/@tarquinen/opencode-dcp/dist/lib/state/utils.js:47:13)
DCP Version
v3.1.7
Opencode Version
1.3.13
Model
Other (specify in description)
Additional Context
Model GLM 5
Bug Description
The
@tarquinen/opencode-dcpplugin crashes with aTypeErrorwhen I ask OpenCode to search for a skill. The error occurs because the plugin attempts to readmsg.info.time.created, but the message structure provided during this specific tool call seems to lack theinfoortimeobject, leading to an undefined evaluation in theisMessageCompactedfunction.Expected Behavior
The skill search should complete successfully, and the DCP plugin should either gracefully handle messages missing the
info.time.createdproperty or correctly parse the tool call's message structure without crashing OpenCode.Debug Context Logs
[ { "role": "user", "time": 1775321784666, "parts": [ { "type": "text", "text": "quante skill hai?\n\n<dcp-message-id>m0001</dcp-message-id>" } ] }, { "role": "user", "time": 1775321784711, "parts": [ { "type": "text", "text": "[analyze-mode]\nANALYSIS MODE. Gather context before diving deep:\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, AST-grep, LSP for targeted searches\n\nIF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:\n- **Oracle**: Conventional problems (architecture, debugging, complex logic)\n- **Artistry**: Non-conventional problems (different approach needed)\n\nSYNTHESIZE findings before proceeding.\n---\nMANDATORY delegate_task params: ALWAYS include load_skills=[] and run_in_background when calling delegate_task.\nExample: delegate_task(subagent_type=\"explore\", prompt=\"...\", run_in_background=true, load_skills=[])\n\n---\n\n<available-skills>\nUse the use_skill, read_skill_file, run_skill_script, and get_available_skills tools to work with skills.\n\n- design-category-pointer: Pointer to a library of 62 specialized Design skills. Use when working on design-related tasks.\n- web-dev-category-pointer: Pointer to a library of 56 specialized Web Dev skills. Use when working on web-dev-related tasks.\n- testing-category-pointer: Pointer to a library of 8 specialized Testing skills. Use when working on testing-related tasks.\n- security-category-pointer: Pointer to a library of 54 specialized Security skills. Use when working on security-related tasks.\n- automation-category-pointer: Pointer to a library of 110 specialized Automation skills. Use when working on automation-related tasks.\n- git-category-pointer: Pointer to a library of 22 specialized Git skills. Use when working on git-related tasks.\n- ai-ml-category-pointer: Pointer to a library of 103 specialized Ai Ml skills. Use when working on ai-ml-related tasks.\n- context-management-category-pointer: Pointer to a library of 17 specialized Context Management skills. Use when working on context-management-related tasks.\n- agents-category-pointer: Pointer to a library of 7 specialized Agents skills. Use when working on agents-related tasks.\n- architecture-category-pointer: Pointer to a library of 27 specialized Architecture skills. Use when working on architecture-related tasks.\n- game-dev-category-pointer: Pointer to a library of 98 specialized Game Dev skills. Use when working on game-dev-related tasks.\n- business-category-pointer: Pointer to a library of 40 specialized Business skills. Use when working on business-related tasks.\n- mobile-category-pointer: Pointer to a library of 7 specialized Mobile skills. Use when working on mobile-related tasks.\n- backend-dev-category-pointer: Pointer to a library of 64 specialized Backend Dev skills. Use when working on backend-dev-related tasks.\n- devops-category-pointer: Pointer to a library of 106 specialized Devops skills. Use when working on devops-related tasks.\n- database-category-pointer: Pointer to a library of 47 specialized Database skills. Use when working on database-related tasks.\n- programming-category-pointer: Pointer to a library of 17 specialized Programming skills. Use when working on programming-related tasks.\n- tooling-category-pointer: Pointer to a library of 9 specialized Tooling skills. Use when working on tooling-related tasks.\n- writing-category-pointer: Pointer to a library of 16 specialized Writing skills. Use when working on writing-related tasks.\n- code-review-category-pointer: Pointer to a library of 7 specialized Code Review skills. Use when working on code-review-related tasks.\n- blockchain-category-pointer: Pointer to a library of 1 specialized Blockchain skills. Use when working on blockchain-related tasks.\n- data-science-category-pointer: Pointer to a library of 9 specialized Data Science skills. Use when working on data-science-related tasks.\n</available-skills>\n\n<dcp-message-id>m0002</dcp-message-id>" } ] }, { "role": "assistant", "time": 1775321784740, "tokens": { "input": 70222, "output": 300, "reasoning": 0, "cache": { "write": 0, "read": 0 } }, "parts": [ { "type": "text", "text": "Operando in **diagnostic mode**.\n\nAnalizzo le skill disponibili nel tuo ambiente di lavoro. Ecco il riepilogo:\n\n## Totale Skill: 24 category-pointer\n\nQueste skill sono puntatori a librerie specializzate. Ecco la distribuzione:\n\n| Categoria | Numero Skill Specializzate |\n|-----------|---------------------------|\n| Automation | 110 |\n| AI-ML | 103 |\n| Game Dev | 98 |\n| DevOps | 106 |\n| Design | 62 |\n| Backend Dev | 64 |\n| Database | 47 |\n| _Uncategorized | 457 |\n| Security | 54 |\n| Web Dev | 56 |\n| Business | 40 |\n| Architecture | 27 |\n| Context Management | 17 |\n| Programming | 17 |\n| Writing | 16 |\n| Tooling | 9 |\n| Data Science | 9 |\n| Testing | 8 |\n| Agents | 7 |\n| Mobile | 7 |\n| Code Review | 7 |\n| Git | 22 |\n| Blockchain | 1 |\n\n---\n\n**Totale skill specializzate sottostanti**: ~1.400+ skill\n\nLe **category-pointer** sono metaskill che puntano a librerie di skill più specifiche. Quando lavori su un task di un determinato dominio, carichi la category-pointer corrispondente e questa ti dà accesso alle skill specializzate per quel settore.\n\n<dcp-system-reminder>\nEvaluate the conversation for compressible ranges.\n\nIf any messages are cleanly closed and unlikely to be needed again, use the compress tool on them.\nIf direction has shifted, compress earlier ranges that are now less relevant.\n\nThe goal is to filter noise and distill key information so context accumulation stays under control.\nKeep active context uncompressed.\n\nCompressed block context:\n- Active compressed blocks in this session: 0 (none)\n- If your selected compression range includes any listed block, include each required placeholder exactly once in the summary using `(bN)`.\n</dcp-system-reminder>\n\n<dcp-message-id>m0003</dcp-message-id>" } ] }, { "role": "user", "time": 1775322532241, "parts": [ { "type": "text", "text": "Carica le skill di laravel\n\n<dcp-message-id>m0004</dcp-message-id>" } ] } ]Tool Call Details
The crash happens exactly when OpenCode triggers a tool call to search for a skill.
Error stack trace snippet:
TypeError: undefined is not an object (evaluating 'msg.info.time.created')
at isMessageCompacted (/home/[YOUR_USER]/.cache/opencode/node_modules/@tarquinen/opencode-dcp/dist/lib/state/utils.js:4:18)
at countTurns (/home/[YOUR_USER]/.cache/opencode/node_modules/@tarquinen/opencode-dcp/dist/lib/state/utils.js:47:13)
DCP Version
v3.1.7
Opencode Version
1.3.13
Model
Other (specify in description)
Additional Context
Model GLM 5