@@ -492,6 +492,29 @@ func TestConfig_setupAgentsWithDisabledTools(t *testing.T) {
492492 assert.Equal(t, []string{"glob", "ls", "sourcegraph", "view"}, taskAgent.AllowedTools)
493493}
494494
495+func TestConfig_setupAgentsWithEveryReadOnlyToolDisabled(t *testing.T) {
496+ cfg := &Config{
497+ Options: &Options{
498+ DisabledTools: []string{
499+ "glob",
500+ "grep",
501+ "ls",
502+ "sourcegraph",
503+ "view",
504+ },
505+ },
506+ }
507+
508+ cfg.SetupAgents()
509+ coderAgent, ok := cfg.Agents["coder"]
510+ require.True(t, ok)
511+ assert.Equal(t, []string{"bash", "download", "edit", "multiedit", "fetch", "write"}, coderAgent.AllowedTools)
512+
513+ taskAgent, ok := cfg.Agents["task"]
514+ require.True(t, ok)
515+ assert.Equal(t, []string{}, taskAgent.AllowedTools)
516+}
517+
495518func TestConfig_configureProvidersWithDisabledProvider(t *testing.T) {
496519 knownProviders := []catwalk.Provider{
497520 {