Custom subagents with explicit model config throw ProviderModelNotFoundError #3586

Closed
opened 2026-02-16 17:40:45 -05:00 by yindo · 7 comments
Owner

Originally created by @esilverio on GitHub (Dec 16, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

When a primary agent invokes a custom subagent (defined in opencode.json) via the Task tool, the subagent fails with ProviderModelNotFoundError even though:

  1. The model is explicitly configured for that subagent
  2. The model is available and works when selected directly via /models

Environment:

  • OpenCode version: latest
  • OS: Windows 11
  • Provider: github-copilot
    opencode.json configuration:
    {
    agent: {
    agentA: {
    mode: primary,
    model: github-copilot/claude-sonnet-4.5,
    maxSteps: 50
    },
    agentB: {
    mode: subagent,
    model: github-copilot/claude-opus-4.5,
    maxSteps: 20
    }
    }
    }

OpenCode version

1.0.155

Steps to reproduce

Steps to reproduce:

  1. Configure a primary agent with explicit model (ex: claude-sonnet-4.5)
  2. Configure a subagent with explicit model (ex: claude-opus-4.5)
  3. Start a session with the primary agent
  4. Primary agent invokes Task tool with subagent_type: "agentB"

Expected behavior:
AgentB subagent should start using claude-opus-4.5 as configured in opencode.json
Actual behavior:
ProviderModelNotFoundError: ProviderModelNotFoundError
Additional context:

  • The model claude-opus-4.5 IS available and works when selected directly via /models
  • Using subagent_type: "general" works correctly

Workaround:
Using subagent_type: "general" with detailed prompts that simulate the specialized agent's behavior.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Originally created by @esilverio on GitHub (Dec 16, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description When a primary agent invokes a custom subagent (defined in opencode.json) via the Task tool, the subagent fails with ProviderModelNotFoundError even though: 1. The model is explicitly configured for that subagent 2. The model is available and works when selected directly via /models Environment: - OpenCode version: latest - OS: Windows 11 - Provider: github-copilot opencode.json configuration: { agent: { agentA: { mode: primary, model: github-copilot/claude-sonnet-4.5, maxSteps: 50 }, agentB: { mode: subagent, model: github-copilot/claude-opus-4.5, maxSteps: 20 } } } ### OpenCode version 1.0.155 ### Steps to reproduce Steps to reproduce: 1. Configure a primary agent with explicit model (ex: claude-sonnet-4.5) 2. Configure a subagent with explicit model (ex: claude-opus-4.5) 3. Start a session with the primary agent 4. Primary agent invokes Task tool with subagent_type: "agentB" Expected behavior: AgentB subagent should start using claude-opus-4.5 as configured in opencode.json Actual behavior: ProviderModelNotFoundError: ProviderModelNotFoundError Additional context: - The model claude-opus-4.5 IS available and works when selected directly via /models - Using subagent_type: "general" works correctly Workaround: Using subagent_type: "general" with detailed prompts that simulate the specialized agent's behavior. ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Windows Terminal
yindo added the bug label 2026-02-16 17:40:45 -05:00
yindo closed this issue 2026-02-16 17:40:45 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 16, 2025):

hm okay ill take a look

@rekram1-node commented on GitHub (Dec 16, 2025): hm okay ill take a look
Author
Owner

@rekram1-node commented on GitHub (Dec 16, 2025):

I cannot replicate your issue can you show me output of:
opencode debug config

@rekram1-node commented on GitHub (Dec 16, 2025): I cannot replicate your issue can you show me output of: `opencode debug config`
Author
Owner

@esilverio commented on GitHub (Dec 17, 2025):

Hi, off course.

{
"$schema": "https://opencode.ai/config.json",
"agent": {
"gohan": {
"model": "github-copilot/claude-sonnet-4.5",
"temperature": 0.2,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"task": true
},
"description": "...",
"mode": "all",
"maxSteps": 15,
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow"
}
},
"takeshi": {
"model": "github-copilot/claude-opus-4.5",
"temperature": 0.1,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"webfetch": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 20,
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow"
}
},
"yuki": {
"model": "github-copilot/claude-sonnet-4.5",
"temperature": 0.2,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 15,
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow"
}
},
"sakura": {
"model": "github-copilot/gpt-5.1-codex",
"temperature": 0.3,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"glob": true,
"grep": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 30,
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow"
}
},
"hiroshi": {
"model": "github-copilot/claude-opus-4.5",
"temperature": 0.1,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"grep": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 20,
"permission": {
"edit": "allow",
"bash": {
"git ": "allow",
"
": "ask"
},
"webfetch": "allow"
}
},
"kaito": {
"model": "github-copilot/claude-sonnet-4.5",
"temperature": 0.1,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"grep": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 20,
"permission": {
"edit": "allow",
"bash": {
"npm test*": "allow",
"dotnet test*": "allow",
"mvn test*": "allow",
"*": "ask"
},
"webfetch": "allow"
}
},
"kenji": {
"model": "github-copilot/claude-haiku-4.5",
"temperature": 0.2,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 15,
"permission": {
"edit": "allow",
"bash": {
"git ": "allow",
"
": "ask"
},
"webfetch": "allow"
}
},
"akira": {
"model": "github-copilot/claude-opus-4.5",
"temperature": 0.2,
"prompt": "...",
"tools": {
"write": true,
"edit": true,
"bash": true,
"read": true,
"glob": true,
"grep": true
},
"description": "...",
"mode": "subagent",
"maxSteps": 25,
"permission": {
"edit": "allow",
"bash": {
"git ": "allow",
"
": "ask"
},
"webfetch": "allow"
}
}
},
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true,
"headers": {
"CONTEXT7_API_KEY": ""
}
}
},
"mode": {},
"plugin": [],
"command": {},
"username": "eduardo.m.silverio",
"keybinds": {
"leader": "ctrl+x",
"app_exit": "ctrl+c,ctrl+d,q",
"editor_open": "e",
"theme_list": "t",
"sidebar_toggle": "b",
"scrollbar_toggle": "none",
"username_toggle": "none",
"status_view": "s",
"session_export": "x",
"session_new": "n",
"session_list": "l",
"session_timeline": "g",
"session_share": "none",
"session_unshare": "none",
"session_interrupt": "escape",
"session_compact": "c",
"messages_page_up": "pageup",
"messages_page_down": "pagedown",
"messages_half_page_up": "ctrl+alt+u",
"messages_half_page_down": "ctrl+alt+d",
"messages_first": "ctrl+g,home",
"messages_last": "ctrl+alt+g,end",
"messages_last_user": "none",
"messages_copy": "y",
"messages_undo": "u",
"messages_redo": "r",
"messages_toggle_conceal": "h",
"tool_details": "none",
"model_list": "m",
"model_cycle_recent": "f2",
"model_cycle_recent_reverse": "shift+f2",
"model_cycle_favorite": "none",
"model_cycle_favorite_reverse": "none",
"command_list": "ctrl+p",
"agent_list": "a",
"agent_cycle": "tab",
"agent_cycle_reverse": "shift+tab",
"input_clear": "ctrl+c",
"input_paste": "ctrl+v",
"input_submit": "return",
"input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
"input_move_left": "left,ctrl+b",
"input_move_right": "right,ctrl+f",
"input_move_up": "up",
"input_move_down": "down",
"input_select_left": "shift+left",
"input_select_right": "shift+right",
"input_select_up": "shift+up",
"input_select_down": "shift+down",
"input_line_home": "ctrl+a",
"input_line_end": "ctrl+e",
"input_select_line_home": "ctrl+shift+a",
"input_select_line_end": "ctrl+shift+e",
"input_visual_line_home": "alt+a",
"input_visual_line_end": "alt+e",
"input_select_visual_line_home": "alt+shift+a",
"input_select_visual_line_end": "alt+shift+e",
"input_buffer_home": "home",
"input_buffer_end": "end",
"input_select_buffer_home": "shift+home",
"input_select_buffer_end": "shift+end",
"input_delete_line": "ctrl+shift+d",
"input_delete_to_line_end": "ctrl+k",
"input_delete_to_line_start": "ctrl+u",
"input_backspace": "backspace,shift+backspace",
"input_delete": "ctrl+d,delete,shift+delete",
"input_undo": "ctrl+-,super+z",
"input_redo": "ctrl+.,super+shift+z",
"input_word_forward": "alt+f,alt+right,ctrl+right",
"input_word_backward": "alt+b,alt+left,ctrl+left",
"input_select_word_forward": "alt+shift+f,alt+shift+right",
"input_select_word_backward": "alt+shift+b,alt+shift+left",
"input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
"input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
"history_previous": "up",
"history_next": "down",
"session_child_cycle": "right",
"session_child_cycle_reverse": "left",
"terminal_suspend": "ctrl+z"
}
}

@esilverio commented on GitHub (Dec 17, 2025): Hi, off course. { "$schema": "https://opencode.ai/config.json", "agent": { "gohan": { "model": "github-copilot/claude-sonnet-4.5", "temperature": 0.2, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "task": true }, "description": "...", "mode": "all", "maxSteps": 15, "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow" } }, "takeshi": { "model": "github-copilot/claude-opus-4.5", "temperature": 0.1, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "webfetch": true }, "description": "...", "mode": "subagent", "maxSteps": 20, "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow" } }, "yuki": { "model": "github-copilot/claude-sonnet-4.5", "temperature": 0.2, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true }, "description": "...", "mode": "subagent", "maxSteps": 15, "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow" } }, "sakura": { "model": "github-copilot/gpt-5.1-codex", "temperature": 0.3, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "glob": true, "grep": true }, "description": "...", "mode": "subagent", "maxSteps": 30, "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow" } }, "hiroshi": { "model": "github-copilot/claude-opus-4.5", "temperature": 0.1, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "grep": true }, "description": "...", "mode": "subagent", "maxSteps": 20, "permission": { "edit": "allow", "bash": { "git *": "allow", "*": "ask" }, "webfetch": "allow" } }, "kaito": { "model": "github-copilot/claude-sonnet-4.5", "temperature": 0.1, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "grep": true }, "description": "...", "mode": "subagent", "maxSteps": 20, "permission": { "edit": "allow", "bash": { "npm test*": "allow", "dotnet test*": "allow", "mvn test*": "allow", "*": "ask" }, "webfetch": "allow" } }, "kenji": { "model": "github-copilot/claude-haiku-4.5", "temperature": 0.2, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true }, "description": "...", "mode": "subagent", "maxSteps": 15, "permission": { "edit": "allow", "bash": { "git *": "allow", "*": "ask" }, "webfetch": "allow" } }, "akira": { "model": "github-copilot/claude-opus-4.5", "temperature": 0.2, "prompt": "...", "tools": { "write": true, "edit": true, "bash": true, "read": true, "glob": true, "grep": true }, "description": "...", "mode": "subagent", "maxSteps": 25, "permission": { "edit": "allow", "bash": { "git *": "allow", "*": "ask" }, "webfetch": "allow" } } }, "mcp": { "context7": { "type": "remote", "url": "https://mcp.context7.com/mcp", "enabled": true, "headers": { "CONTEXT7_API_KEY": "" } } }, "mode": {}, "plugin": [], "command": {}, "username": "eduardo.m.silverio", "keybinds": { "leader": "ctrl+x", "app_exit": "ctrl+c,ctrl+d,<leader>q", "editor_open": "<leader>e", "theme_list": "<leader>t", "sidebar_toggle": "<leader>b", "scrollbar_toggle": "none", "username_toggle": "none", "status_view": "<leader>s", "session_export": "<leader>x", "session_new": "<leader>n", "session_list": "<leader>l", "session_timeline": "<leader>g", "session_share": "none", "session_unshare": "none", "session_interrupt": "escape", "session_compact": "<leader>c", "messages_page_up": "pageup", "messages_page_down": "pagedown", "messages_half_page_up": "ctrl+alt+u", "messages_half_page_down": "ctrl+alt+d", "messages_first": "ctrl+g,home", "messages_last": "ctrl+alt+g,end", "messages_last_user": "none", "messages_copy": "<leader>y", "messages_undo": "<leader>u", "messages_redo": "<leader>r", "messages_toggle_conceal": "<leader>h", "tool_details": "none", "model_list": "<leader>m", "model_cycle_recent": "f2", "model_cycle_recent_reverse": "shift+f2", "model_cycle_favorite": "none", "model_cycle_favorite_reverse": "none", "command_list": "ctrl+p", "agent_list": "<leader>a", "agent_cycle": "tab", "agent_cycle_reverse": "shift+tab", "input_clear": "ctrl+c", "input_paste": "ctrl+v", "input_submit": "return", "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j", "input_move_left": "left,ctrl+b", "input_move_right": "right,ctrl+f", "input_move_up": "up", "input_move_down": "down", "input_select_left": "shift+left", "input_select_right": "shift+right", "input_select_up": "shift+up", "input_select_down": "shift+down", "input_line_home": "ctrl+a", "input_line_end": "ctrl+e", "input_select_line_home": "ctrl+shift+a", "input_select_line_end": "ctrl+shift+e", "input_visual_line_home": "alt+a", "input_visual_line_end": "alt+e", "input_select_visual_line_home": "alt+shift+a", "input_select_visual_line_end": "alt+shift+e", "input_buffer_home": "home", "input_buffer_end": "end", "input_select_buffer_home": "shift+home", "input_select_buffer_end": "shift+end", "input_delete_line": "ctrl+shift+d", "input_delete_to_line_end": "ctrl+k", "input_delete_to_line_start": "ctrl+u", "input_backspace": "backspace,shift+backspace", "input_delete": "ctrl+d,delete,shift+delete", "input_undo": "ctrl+-,super+z", "input_redo": "ctrl+.,super+shift+z", "input_word_forward": "alt+f,alt+right,ctrl+right", "input_word_backward": "alt+b,alt+left,ctrl+left", "input_select_word_forward": "alt+shift+f,alt+shift+right", "input_select_word_backward": "alt+shift+b,alt+shift+left", "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete", "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace", "history_previous": "up", "history_next": "down", "session_child_cycle": "<leader>right", "session_child_cycle_reverse": "<leader>left", "terminal_suspend": "ctrl+z" } }
Author
Owner

@gliatti commented on GitHub (Dec 20, 2025):

I'm experiencing a similar issue with custom agents defined via markdown files in ~/.config/opencode/agent/.

When specifying a model: field in the YAML frontmatter, opencode adds a trailing / to the model name, causing validation to fail.

Example agent configuration:

---
description: Expert PostgreSQL - recherche dans la documentation RAG
model: ollama:qwencoder14b:latest
mode: primary
temperature: 0.1
---

Error message:

Agent postgresql-expert's configured model ollama:qwencoder14b:latest/ is not valid

Note the trailing / added to the model name (qwencoder14b:latest/).

Workaround: Removing the model: field from the agent definition allows the agent to use the default model successfully.

Environment:

  • OpenCode version: 1.0.174
  • OS: Ubuntu 24.04.3 LTS (WSL2, kernel 6.6.87.2-microsoft-standard-WSL2)
  • Provider: Ollama 0.13.3 (local)
@gliatti commented on GitHub (Dec 20, 2025): I'm experiencing a similar issue with custom agents defined via markdown files in `~/.config/opencode/agent/`. When specifying a `model:` field in the YAML frontmatter, opencode adds a trailing `/` to the model name, causing validation to fail. **Example agent configuration:** ```yaml --- description: Expert PostgreSQL - recherche dans la documentation RAG model: ollama:qwencoder14b:latest mode: primary temperature: 0.1 --- ``` **Error message:** ``` Agent postgresql-expert's configured model ollama:qwencoder14b:latest/ is not valid ``` Note the trailing `/` added to the model name (`qwencoder14b:latest/`). **Workaround:** Removing the `model:` field from the agent definition allows the agent to use the default model successfully. **Environment:** - OpenCode version: 1.0.174 - OS: Ubuntu 24.04.3 LTS (WSL2, kernel 6.6.87.2-microsoft-standard-WSL2) - Provider: Ollama 0.13.3 (local)
Author
Owner

@rekram1-node commented on GitHub (Dec 20, 2025):

@robinportigliatti your model does not appear to be valid it always needs to be in format:

provider/model

so either your provider prefix is missing or you arent using correct separator

to see valid model ids just run:

opencode models

@rekram1-node commented on GitHub (Dec 20, 2025): @robinportigliatti your model does not appear to be valid it always needs to be in format: provider/model so either your provider prefix is missing or you arent using correct separator to see valid model ids just run: opencode models
Author
Owner

@diegonix commented on GitHub (Jan 20, 2026):

opencode is adding \n in the end of the model line:

opencode debug config
...
    "my-agent": {
      "model": "synthetic/hf:zai-org/GLM-4.7\n",
...

agent config file:

description: My Agent
mode: subagent
model: synthetic/hf:zai-org/GLM-4.7
options:
...
@diegonix commented on GitHub (Jan 20, 2026): opencode is adding `\n` in the end of the model line: ```sh opencode debug config ... "my-agent": { "model": "synthetic/hf:zai-org/GLM-4.7\n", ... ``` agent config file: ``` description: My Agent mode: subagent model: synthetic/hf:zai-org/GLM-4.7 options: ... ```
Author
Owner

@mdc-git commented on GitHub (Jan 23, 2026):

~/.config/opencode/agent$ cat glm.md
---
description: General purpose GLM model agent
model: synthetic/hf:zai-org/GLM-4.7
---

Same issue, I tried hf:zai-org/GLM-4.7 and synthetic/GLM-4.7 as well.

$ opencode models synthetic
synthetic/hf:deepseek-ai/DeepSeek-R1
synthetic/hf:deepseek-ai/DeepSeek-R1-0528
synthetic/hf:deepseek-ai/DeepSeek-V3
synthetic/hf:deepseek-ai/DeepSeek-V3-0324
synthetic/hf:deepseek-ai/DeepSeek-V3.1
synthetic/hf:deepseek-ai/DeepSeek-V3.1-Terminus
synthetic/hf:deepseek-ai/DeepSeek-V3.2
synthetic/hf:meta-llama/Llama-3.1-405B-Instruct
synthetic/hf:meta-llama/Llama-3.1-70B-Instruct
synthetic/hf:meta-llama/Llama-3.1-8B-Instruct
synthetic/hf:meta-llama/Llama-3.3-70B-Instruct
synthetic/hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
synthetic/hf:meta-llama/Llama-4-Scout-17B-16E-Instruct
synthetic/hf:MiniMaxAI/MiniMax-M2
synthetic/hf:MiniMaxAI/MiniMax-M2.1
synthetic/hf:moonshotai/Kimi-K2-Instruct-0905
synthetic/hf:moonshotai/Kimi-K2-Thinking
synthetic/hf:openai/gpt-oss-120b
synthetic/hf:Qwen/Qwen2.5-Coder-32B-Instruct
synthetic/hf:Qwen/Qwen3-235B-A22B-Instruct-2507
synthetic/hf:Qwen/Qwen3-235B-A22B-Thinking-2507
synthetic/hf:Qwen/Qwen3-Coder-480B-A35B-Instruct
synthetic/hf:zai-org/GLM-4.5
synthetic/hf:zai-org/GLM-4.6
synthetic/hf:zai-org/GLM-4.7

EDIT: Nevermind. Putting quotation marks around the model name seems to fix this. Wasn't needed for opencode provider though.

model: "synthetic/hf:zai-org/GLM-4.7"

works for me.

@mdc-git commented on GitHub (Jan 23, 2026): ``` ~/.config/opencode/agent$ cat glm.md --- description: General purpose GLM model agent model: synthetic/hf:zai-org/GLM-4.7 --- ``` Same issue, I tried `hf:zai-org/GLM-4.7` and `synthetic/GLM-4.7` as well. ``` $ opencode models synthetic synthetic/hf:deepseek-ai/DeepSeek-R1 synthetic/hf:deepseek-ai/DeepSeek-R1-0528 synthetic/hf:deepseek-ai/DeepSeek-V3 synthetic/hf:deepseek-ai/DeepSeek-V3-0324 synthetic/hf:deepseek-ai/DeepSeek-V3.1 synthetic/hf:deepseek-ai/DeepSeek-V3.1-Terminus synthetic/hf:deepseek-ai/DeepSeek-V3.2 synthetic/hf:meta-llama/Llama-3.1-405B-Instruct synthetic/hf:meta-llama/Llama-3.1-70B-Instruct synthetic/hf:meta-llama/Llama-3.1-8B-Instruct synthetic/hf:meta-llama/Llama-3.3-70B-Instruct synthetic/hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 synthetic/hf:meta-llama/Llama-4-Scout-17B-16E-Instruct synthetic/hf:MiniMaxAI/MiniMax-M2 synthetic/hf:MiniMaxAI/MiniMax-M2.1 synthetic/hf:moonshotai/Kimi-K2-Instruct-0905 synthetic/hf:moonshotai/Kimi-K2-Thinking synthetic/hf:openai/gpt-oss-120b synthetic/hf:Qwen/Qwen2.5-Coder-32B-Instruct synthetic/hf:Qwen/Qwen3-235B-A22B-Instruct-2507 synthetic/hf:Qwen/Qwen3-235B-A22B-Thinking-2507 synthetic/hf:Qwen/Qwen3-Coder-480B-A35B-Instruct synthetic/hf:zai-org/GLM-4.5 synthetic/hf:zai-org/GLM-4.6 synthetic/hf:zai-org/GLM-4.7 ``` EDIT: Nevermind. Putting **quotation marks** around the model name seems to fix this. Wasn't needed for opencode provider though. ``` model: "synthetic/hf:zai-org/GLM-4.7" ``` works for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3586