#2502·LangBot

[Bug]: Native write schema incorrectly advertises base64 support for activated skill paths

Author: 22373448Created Sep 3, 2026Updated Sep 7, 2026
Labelsbug?

Runtime environment

Python 3.12.14

Deployment version

Community Edition

Exception

The native write tool uses one global schema for both workspace files and activated skill files.

The schema states that activated skills are writable and that encoding="base64" is supported:

src/langbot/pkg/provider/tools/loaders/native.py:1390

description=(
    'Create or overwrite a file at the given path under /workspace with the provided content. '
    'Activated skill packages can be modified through /workspace/.skills/<skill-name>/... . '
),

'encoding': {
    'type': 'string',
    'description': 'Write content as text by default, or decode it from base64 for binary files.',
    'enum': ['text', 'base64'],
    'default': 'text',
},

However, when the path resolves to an activated skill, base64 writes are explicitly rejected:

src/langbot/pkg/provider/tools/loaders/native.py:1169

skill_request = self._resolve_skill_relative_path(
    query,
    path,
    include_visible=False,
    include_activated=True,
)
if skill_request is not None and hasattr(self.ap.box_service, 'write_skill_file'):
    if encoding != 'text':
        return {
            'ok': False,
            'error': 'base64 writes to skill packages are not supported.',
        }

The same branch also ignores mode="append" and performs an overwrite through write_skill_file.

Note: This issue was identified by an automated testing tool for academic research and manually verified. If you have any concerns about this type of reporting, please let me know, and I will adjust my workflow accordingly.

Reproduction steps

No response

Enabled plugins

No response