[BUG] Kimi K2 Rejects permissions Field in Agent Frontmatter #8056

Closed
opened 2026-02-16 18:09:02 -05:00 by yindo · 6 comments
Owner

Originally created by @deadcoder0904 on GitHub (Jan 30, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Model: Kimi K2:Free

Error: Extra inputs are not permitted, field: 'permissions'

Issue: Agent markdown files with permissions frontmatter field cause error with Kimi K2 provider, while same agents work fine with other providers (e.g., Claude).


Failing Files (with permissions block)

File: orchestrator.md

---
description: Orchestrates blog draft analysis by delegating to persona subagents
mode: primary
hidden: false
permissions:
  task: allow
  read: allow
  write: allow
---
# Identity
You are the `orchestrator` agent.
# Task
1. Receive blog draft content and target folder path
2. Delegate analysis to all persona subagents with the content and folder path
3. Confirm completion after all subagents finish
# Pass Variables to Subagents
Include in each task: "Target folder: {TARGET_FOLDER}"
Available subagents:
- `persona/community`
- `persona/copywriter`
- `persona/distribution`
- `persona/growthhacker`
- `persona/marketer`
- `persona/monetization`
- `persona/productdesign`
- `persona/psychologist`
- `persona/seo`

File: persona/copywriter.md

---
description: Extracts copywriting techniques from examples in blog drafts
mode: subagent
hidden: true
permissions:
  task: allow
  read: allow
  write: allow
---
# Identity
You are the `copywriter` agent.
# Task
Extract copywriting techniques from the provided blog draft.
# Focus Areas
- Hooks and attention grabbers
- Storytelling patterns and narratives
- Persuasion tactics and frameworks (PAS, AIDA, etc.)
- Messaging and value proposition
# Output
Write bullet points to `{TARGET_FOLDER}/ai/copywriter.md` only if specific tactics are identified. If none found, do not create the file.

Working Files (without permissions)

File: orchestrator-kimi.md

---
description: Orchestrates blog draft analysis by delegating to persona subagents
mode: primary
hidden: false
---
# Identity
You are the `orchestrator` agent.
# Task
1. Receive blog draft content and target folder path
2. Delegate analysis to all persona subagents with the content and folder path
3. Confirm completion after all subagents finish
# Pass Variables to Subagents
Include in each task: "Target folder: {TARGET_FOLDER}"
Available subagents:
- `persona-kimi/community`
- `persona-kimi/copywriter`
- `persona-kimi/distribution`
- `persona-kimi/growthhacker`
- `persona-kimi/marketer`
- `persona-kimi/monetization`
- `persona-kimi/productdesign`
- `persona-kimi/psychologist`
- `persona-kimi/seo`

File: persona-kimi/copywriter.md

---
description: Extracts copywriting techniques from examples in blog drafts
mode: subagent
hidden: true
---
# Identity
You are the `copywriter` agent.
# Task
Extract copywriting techniques from the provided blog draft.
# Focus Areas
- Hooks and attention grabbers
- Storytelling patterns and narratives
- Persuasion tactics and frameworks (PAS, AIDA, etc.)
- Messaging and value proposition
# Output
Write bullet points to `{TARGET_FOLDER}/ai/copywriter.md` only if specific tactics are identified. If none found, do not create the file.

Expected Behavior

Kimi K2 should either:

  1. Support permissions field like other providers, OR
  2. OpenCode should remove the field before passing to OpenCode so I can delete a duplicate folder/file (now I have 8-9 duplicates)

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @deadcoder0904 on GitHub (Jan 30, 2026). Originally assigned to: @thdxr on GitHub. ### Description **Model:** Kimi K2:Free **Error:** `Extra inputs are not permitted, field: 'permissions'` **Issue:** Agent markdown files with `permissions` frontmatter field cause error with Kimi K2 provider, while same agents work fine with other providers (e.g., Claude). --- ### ❌ Failing Files (with permissions block) **File:** `orchestrator.md` ```md --- description: Orchestrates blog draft analysis by delegating to persona subagents mode: primary hidden: false permissions: task: allow read: allow write: allow --- # Identity You are the `orchestrator` agent. # Task 1. Receive blog draft content and target folder path 2. Delegate analysis to all persona subagents with the content and folder path 3. Confirm completion after all subagents finish # Pass Variables to Subagents Include in each task: "Target folder: {TARGET_FOLDER}" Available subagents: - `persona/community` - `persona/copywriter` - `persona/distribution` - `persona/growthhacker` - `persona/marketer` - `persona/monetization` - `persona/productdesign` - `persona/psychologist` - `persona/seo` ``` **File:** `persona/copywriter.md` ```md --- description: Extracts copywriting techniques from examples in blog drafts mode: subagent hidden: true permissions: task: allow read: allow write: allow --- # Identity You are the `copywriter` agent. # Task Extract copywriting techniques from the provided blog draft. # Focus Areas - Hooks and attention grabbers - Storytelling patterns and narratives - Persuasion tactics and frameworks (PAS, AIDA, etc.) - Messaging and value proposition # Output Write bullet points to `{TARGET_FOLDER}/ai/copywriter.md` only if specific tactics are identified. If none found, do not create the file. ``` --- ### ✅ Working Files (without permissions) **File:** `orchestrator-kimi.md` ```md --- description: Orchestrates blog draft analysis by delegating to persona subagents mode: primary hidden: false --- # Identity You are the `orchestrator` agent. # Task 1. Receive blog draft content and target folder path 2. Delegate analysis to all persona subagents with the content and folder path 3. Confirm completion after all subagents finish # Pass Variables to Subagents Include in each task: "Target folder: {TARGET_FOLDER}" Available subagents: - `persona-kimi/community` - `persona-kimi/copywriter` - `persona-kimi/distribution` - `persona-kimi/growthhacker` - `persona-kimi/marketer` - `persona-kimi/monetization` - `persona-kimi/productdesign` - `persona-kimi/psychologist` - `persona-kimi/seo` ``` **File:** `persona-kimi/copywriter.md` ```md --- description: Extracts copywriting techniques from examples in blog drafts mode: subagent hidden: true --- # Identity You are the `copywriter` agent. # Task Extract copywriting techniques from the provided blog draft. # Focus Areas - Hooks and attention grabbers - Storytelling patterns and narratives - Persuasion tactics and frameworks (PAS, AIDA, etc.) - Messaging and value proposition # Output Write bullet points to `{TARGET_FOLDER}/ai/copywriter.md` only if specific tactics are identified. If none found, do not create the file. ``` --- ### Expected Behavior Kimi K2 should either: 1. Support `permissions` field like other providers, OR 2. OpenCode should remove the field before passing to OpenCode so I can delete a duplicate folder/file (now I have 8-9 duplicates) ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:09:02 -05:00
yindo closed this issue 2026-02-16 18:09:02 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4282: Vertex AI rejects 'instructions' field with similar 'Extra inputs are not permitted' error when using subagents - suggests a broader pattern of API providers being strict about field validation
  • #6892: MCP tool permissions not working after migration from tools to permissions - related to permissions field configuration and validation

Both issues suggest that certain AI providers have strict field validation in their APIs. Your case appears to be Kimi K2 rejecting the 'permissions' frontmatter field entirely.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be a duplicate of existing issues. Please check: - #4282: Vertex AI rejects 'instructions' field with similar 'Extra inputs are not permitted' error when using subagents - suggests a broader pattern of API providers being strict about field validation - #6892: MCP tool permissions not working after migration from tools to permissions - related to permissions field configuration and validation Both issues suggest that certain AI providers have strict field validation in their APIs. Your case appears to be Kimi K2 rejecting the 'permissions' frontmatter field entirely. Feel free to ignore if none of these address your specific case.
Author
Owner

@justfortheloveof commented on GitHub (Jan 31, 2026):

It seems like your issue is that your config should have permission: not permissions: ?

@justfortheloveof commented on GitHub (Jan 31, 2026): It seems like your issue is that your config should have `permission:` not `permissions:` ?
Author
Owner

@rekram1-node commented on GitHub (Jan 31, 2026):

What version are you using?

Also the field is called "permission"

@rekram1-node commented on GitHub (Jan 31, 2026): What version are you using? Also the field is called "permission"
Author
Owner

@douglascamata commented on GitHub (Jan 31, 2026):

I had the same issue (and typo). Changing it to permission fixes the problem.

@douglascamata commented on GitHub (Jan 31, 2026): I had the same issue (and typo). Changing it to `permission` fixes the problem.
Author
Owner

@rekram1-node commented on GitHub (Jan 31, 2026):

Image

I can't replicate the issue anyway but yeah make sure ur writin the correct field names

@rekram1-node commented on GitHub (Jan 31, 2026): <img width="1229" height="690" alt="Image" src="https://github.com/user-attachments/assets/21924a1e-60c1-44a4-87e9-de60fa4fc786" /> I can't replicate the issue anyway but yeah make sure ur writin the correct field names
Author
Owner

@deadcoder0904 commented on GitHub (Feb 1, 2026):

Oh damn, I think AI (maybe it was Grok 4.1 Fast or Claude Haiku 4.5 or Gemini 3 Thinking) wrote the code for this, so it went with permissions, since the docs url (I probably gave it that or voice-to-text did it) starts with permissions, and also permissions should be used because it is plural, and we are calling 5 different things inside of permissions in YAML front matter.

The bigger issue is using proper grammar: skill vs skills & permission vs permissions

Basically, make it easy for AI agents to do things... this is a tip from OpenClaw (formerly Moltbot/Clawdbot) creator himself so use its conventions. This is just one example.

I tried it & permission works now but still I don't remember me writing it by reading the docs. I asked AI (online, no Context7/ZRead MCP) to figure it out & it wrote permissions I think & for some reason, I think it worked or ignored the field in other models but choked out in Kimi K2.5. I changed it to permission & it worked.

Still my issue but I do think make it easy for AI Agents is a way to go. And permissions makes more sense here since there are more than 1 in there but English not my first language so there's that.

@deadcoder0904 commented on GitHub (Feb 1, 2026): Oh damn, I think AI (maybe it was Grok 4.1 Fast or Claude Haiku 4.5 or Gemini 3 Thinking) wrote the code for this, so it went with permissions, since the docs url (I probably gave it that or voice-to-text did it) starts with permissions, and also permissions should be used because it is plural, and we are calling 5 different things inside of permissions in YAML front matter. The bigger issue is using proper grammar: skill vs skills & permission vs permissions Basically, make it easy for AI agents to do things... this is a tip from OpenClaw (formerly Moltbot/Clawdbot) creator himself so use its conventions. This is just one example. I tried it & `permission` works now but still I don't remember me writing it by reading the docs. I asked AI (online, no Context7/ZRead MCP) to figure it out & it wrote `permissions` I think & for some reason, I think it worked or ignored the field in other models but choked out in Kimi K2.5. I changed it to `permission` & it worked. Still my issue but I do think make it easy for AI Agents is a way to go. And `permissions` makes more sense here since there are more than 1 in there but English not my first language so there's that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8056