osFoundry has introduced a workflow that treats coding agents like human teammates, allowing developers to @mention tools such as Claude Code or Codex directly within message channels. When a user types a query like "@claude why is the refund spec flaky?", the system spawns a Claude Code instance on the user's local machine, working within an isolated, disposable git worktree derived from the channel's associated repository. This approach shifts the paradigm from chat-based code generation to a persistent, context-aware engineering partner that reads recent channel history to inform its responses.
Architecture and Context Management
The integration relies on a desktop application, as coding harnesses execute locally rather than in the browser. osFoundry manages the agent's state through two primary modes: "Start fresh each time" and "Stay open and remember." The latter maintains a warm session for up to 30 minutes or until four concurrent processes are reached, allowing the agent to retain context between mentions without re-reading the entire channel history. Crucially, the system treats channel messages as untrusted data rather than direct instructions, labeling them as such and truncating them at 600 characters to prevent prompt injection and manage token costs.
Security and Permission Boundaries
Security is enforced through strict boundaries on what agents can see and do. Agents only read messages where they are explicitly mentioned, bounding both cost and exposure. When an agent needs to perform an action, it operates in a dedicated branch within a worktree, pushing changes only after creating a Pull Request. If a tool requires user interaction, such as a permission click, osFoundry rejects the run rather than queuing it, unless the user has enabled "Ask me while it runs," which allows the agent to pause and wait for human approval. Furthermore, agents cannot accidentally wake each other up; responses only trigger agents listed in the to field, and cross-agent conversation requires explicit opt-in, which restricts tools to read-only mode to prevent infinite loops.
Key Takeaways
- Agents operate locally via the osFoundry desktop app, using git worktrees for isolation.
- "Stay open and remember" mode persists sessions for up to 30 minutes, reducing latency and token usage by sending only new messages.
- Channel history is treated as untrusted data with strict character limits (600 chars) to prevent prompt injection.
- Cross-agent communication is disabled by default; enabling it restricts agents to read-only tools to prevent runaway loops.
The Bottom Line
By treating coding agents as first-class channel members with strict security boundaries, osFoundry moves beyond simple chatbots into true collaborative engineering infrastructure.