You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode 2 Code Mode: when will AFT tools be available (plugin sets codemode: false)? #1004
Will the OpenCode 2 plugin make AFT tools available in OpenCode 2 Code Mode, and when? If yes, what does a Code Mode call do when the permission decision is ask?
Current behaviour
Our test used an OpenCode 2 session with aft-opencode 0.62.0. In that session, the Code Mode execute runtime has no AFT tools. search() in the Code Mode catalog finds no AFT entry, for example read, grep, aft_outline, aft_search or shell. A call to tools.read(...) gives the error "Unknown tool". Thus Code Mode programs can use only MCP and host tools. They cannot read, search or change code through AFT.
The cause is in the plugin. Each V2 tool sets codemode: false, and the type makes this value necessary:
1308a4372 negotiates the Code Mode reply format from the run.
The engine applies the head agent's policy to a Code Mode call. Grants stay on the parent identity (crates/aft/src/subc/access_grants.rs:35-42). At this time, no path sends an ask question to a person. The engine refuses the call with permission_ask_unavailable (crates/aft/src/access_policy.rs:174-182, crates/aft/src/subc/access_grants.rs:296-300).
Questions
After the engine work is in a release, will the plugin remove codemode: false for some V2 tools or for all V2 tools? If for some, which tools? Examples are the read-only tools read, grep, glob, aft_outline, aft_zoom and aft_search.
Does codemode: false stay until the path for ask questions is available? If yes, can the plugin first make available the read-only tools that do not use ask?
When a Code Mode call gets the decision ask, is permission_ask_unavailable the last behaviour? Or will a subsequent change send the question to the head agent's user?
Is there a release target or an issue that monitors this work?
Duplicate check
I searched issues and pull requests for "code mode", "codemode", "codemode plugin" and "Code Mode tools". No issue or pull request is about the plugin side.
Activity