Skip to content

[Gastown] Polecats in headless mode hang indefinitely on edit and write tool calls (requires UI confirmation) #4216

Description

@ThePlenkov

What happened?

Summary

Polecats spawned by Gastown to execute work in rig worktrees hang indefinitely on edit and write tool calls. The Kilo tools require UI confirmation, but polecats run headless with no UI. The call sits pending forever. Status shows working, last_activity_at updates, but no progress is made.

Observed in

Town 6b110d52-9a70-4742-91d8-fab68a2bec3c, rig 905bf756-546a-484c-9b4e-1a0b6b903457 (nx.ts).

Two confirmed cases:

  1. Toast on bead 5347e949-318b-49f7-9b74-1febe7dfac39 (2026-06-23, ~4 hours). Task: append a section to AGENTS.md. Stuck on edit AGENTS.md step. Required reset and re-sling.
  2. Maple on bead 043db6f2-2410-4313-9d2f-c892628ed9b0 (2026-06-23, ~30+ minutes). Same task. Same hang.

Root cause

Kilo's edit and write tools require UI confirmation. Polecats in headless mode have no UI. The call enters a pending state that is not surfaced as an error — gt_list_agents shows the polecat as working with fresh last_activity_at, but no file modifications are made.

Impact

Wasted polecat compute, confused dashboards, frustrated users. The polecat is invisible-stuck: dispatcher sees working, dashboard sees activity, but no progress happens. Only manual inspection of the polecat's worktree (git status clean, no commits) reveals the hang.

Expected behavior

Either:

  1. Polecats spawned by Gastown should not have access to interactive tools (configurable per-agent permission set), OR
  2. The dispatcher / runtime should auto-detect hangs on edit / write calls and fail them with a clear error, OR
  3. Polecats should default to a Kilo agent that has edit: deny, write: deny, bash: allow and instructions to use bash for file modifications.

Workaround applied locally

A polecat Kilo agent definition has been created at ThePlenkov/nx.ts (upstream, commit 0c5b3b9) at path .kilo/agent/polecat.md. It explicitly denies edit and write and tells the polecat to use bash with heredoc, sed, or git apply instead. See https://kilo.ai/docs/customize/agent-permissions for the permission model.

This workaround only helps if the Gastown dispatcher honors Kilo agent definitions when spawning polecats. The bug report is to ask: does it? If not, please add support.

Reproduction

  1. Create a bead body that asks a polecat to modify a file using the edit tool.
  2. Sling it.
  3. Observe: polecat status working indefinitely, no file changes, no error surfaced.

Severity

High. Any bead body that uses the edit or write tool hangs silently. This affects any polecat working on a non-trivial task in this town.

Area

Agent Dispatch / Scheduling

Context

  • Town ID: 6b110d52-9a70-4742-91d8-fab68a2bec3c
  • Agent: Mayor (e920f2fe-6fce-4534-ae2e-43549fd8c66f)
  • Rig ID: 905bf756-546a-484c-9b4e-1a0b6b903457

Recent Errors

Polecat edit tool hangs in headless mode — confirmed for Toast (bead 5347e949) and Maple (bead 043db6f2). No error surface, just silent indefinite pending.

Filed automatically by the Mayor via gt_report_bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions