Thursdays with Koog: Permissions Knosh 0.3.0, a one-shot coding agent built on the Koog framework, implements a permission system that allows agents to deny specific tools by their unique identifiers in frontmatter, with filesystem-manipulating tools requiring more fine-grained access controls. The system, adapted from OpenCode, defaults to allowing all tools but supports a 'deny' flag, while omitting OpenCode's 'ask' prompt because Knosh is non-interactive. A month ago, in a past "Thursdays with Koog" issue, I described Koog's https://docs.koog.ai framework for tools https://pac.commonsware.com/archive/thursdays-with-koog-tools/ . Today, I'd like to talk a bit about how Knosh https://knosh.commonsware.com works with tools, in particular how things get secured. Knosh sticks to Koog's tools-as-classes pattern, and so it has a bunch of SimpleTool subclasses like GetWorkingDirectoryTool : python package com.commonsware.knosh.tools import ai.koog.agents.core.tools.SimpleTool import ai.koog.serialization.typeToken import com.commonsware.knosh.common.RuntimeContext import kotlinx.serialization.Serializable // Raw string is exempt from MaxLineLength per project Detekt config excludeRawStrings: true private val DESCRIPTION = """ You MUST use this tool to get the current working directory. You do not have access to a shell, Bash, or any command-line tools — do not guess or assume the working directory. Usage: - Takes no arguments. - The returned path is absolute and can be used to resolve relative paths or to understand the root from which other tools operate. """ .trimIndent / Tool that returns the current working directory as an absolute filesystem path string. Takes no meaningful input. / public class GetWorkingDirectoryTool private val context: RuntimeContext : SimpleTool