Mains foragents.

Run AI coding agents in secure workspaces. Inspect changes, collaborate with agents, and ship with confidence.

file_type_claudeReview app with pa…
Pull the latest main into this workspace and run the test suite.

Rebased feature/issue-pr-screen onto origin/main — no conflicts. Running the suite now.

142 tests passed in 18.4s, nothing failed. The workspace is clean apart from the two files you left staged.

The GitHub device-flow panel re-renders on every poll tick. Can you fix that?

Fixed. The poll interval lived in a state setter, so every tick recreated the callback and re-rendered the panel; it now holds the timer in a ref and only re-renders when the auth status actually changes.

Review this app with parallel subagents. Spawn one subagent for security risks, one for test gaps, and one for maintainability. Wait for all three, then summarize the findings by category with file references.

I'll spawn three parallel agents to review the codebase across security, test coverage, and maintainability.

All three agents (security, test gaps, maintainability) are now running in parallel in the background. I'll wait for all three to complete and then compile a combined summary organized by category with file references.

Test-gap agent is done. Waiting on security and maintainability agents before compiling the combined summary.

Maintainability agent is done too. Still waiting on the security review agent.

All three reviews are complete. Here's the combined summary.

Review Summary

All three reviews are complete. No critical or blocking issues were identified.

🔒 Security

No significant security risks found. Authentication, IPC boundaries, filesystem access, credentials, and command execution follow safe patterns.

Result: ✅ Passed

🧪 Test Coverage

Core workflows and security-sensitive paths are covered. No major test gaps or release-blocking issues found.

Result: ✅ Passed

🔧 Maintainability

The codebase is well-structured with clear boundaries, consistent patterns, and no major architectural concerns.

Result: ✅ Passed

CategoryStatusIssues
Security✅ Passed0
Tests✅ Passed0
Maintainability✅ Passed0

Overall: ✅ Project is in good shape and ready to ship.

10m 45s·
Ask a follow-up, use @ or / for commands, files, skills and issues⌘ P to focus
file_type_claudeOpus 5 [1M]HighEdit
Changes+1-11
github-device-flow-panel.tsx+1-11
feature/issue-pr-screen
ionicons-v5-dCommit or push
git_pull_request_lineCreate pull request
Subagents (5)
Agent tool safety audit
Command injection audit
Maintainability review
Test gap review
Security risk review

Built for agent workflows

+Add Repository
N
Workspaces
J
OkanBilal/mains
+1222-516
update-dependencies·6h ago
R
raycast/extensions
+323-122
mains-extension·6h ago
H
OkanBilal/home
local-llm-integration·6h ago
J
OkanBilal/mains-docs
add-agent-auth-docs·7h ago
J
OkanBilal/mains-landing
add-caching-layer·20h ago
J
OkanBilal/mains-landing
keyboard-shortcuts·20h ago
J
OkanBilal/mains
refactor-agent-architecture·1d ago

Run agents in isolated workspaces

Spin up Git-backed workspaces linked to your repos. Run AI coding agents like Claude Code, Copilot or Codex in secure, sandboxed environments.

src
public
file_type_typescriptdrizzle.config.runtime.ts
file_type_typescriptdrizzle.config.ts
file_type_typescriptglobal.d.ts
file_type_typescriptnext.config.ts
file_type_claudeCLAUDE.md
file_type_markdownREADME.md
file_type_nodepackage.json
file_type_postcssconfigpostcss.config.mjs
file_type_jsontsconfig.preload.json
file_type_jsontsconfig.renderer.json
file_type_jsvite.preload.config.mjs
file_type_jsvite.renderer.config.mjs

Review every change before committing

Browse files, inspect diffs, and track changes across tabs. See exactly what the agent modified before you commit or open a pull request.

Implement multi-file diff viewer component
Feature
Add WebSocket support for real-time updates
Feature
Refactor AST parser to support TypeScript
Enhancement
Git merge conflict resolution UI
Feature
file_type_gitlab
Fix race condition in concurrent file access
Bug
Add LSP integration for code intelligence
Feature
Optimize tree-sitter parsing for large files
Enhancement
file_type_gitlab
SSH tunnel drops connection after idle timeout
Bug
Implement workspace snapshot & restore
Feature
Add OpenAPI spec generation from routes
Enhancement

Link tasks from your tools

Connect issues from GitHub, Gitlab, Linear, Jira, and Asana directly to a workspace. Give agents the right context to start working immediately.

Review every change before it ships

Inspect diffs, catch issues with inline annotations, and approve with confidence — before any code reaches your main branch.

runDispatcher.ts
@@ -53,9 +53,15 @@
5353 export async function dispatchRun(request: DispatchRunRequest): Promise<DispatchRunResult> {
5454 const runId = generateRunId();
5555
56- // Load provider
57- const provider = await providersRepo.findById(request.accountId);
56+ // 1. Load and validate provider
57+ const provider = await providersRepo.findById(request.providerId);
5858 if (!provider) {
59- throw new Error(`Provider not found`);
59+ throw new Error(`Provider "${request.providerId}" not found`);
60+ }
61+ if (!provider.isEnabled) {
62+ throw new Error(`Provider "${provider.displayName}" is not enabled`);
63+ }
64+ if (!isSupportedWorkProvider(provider.id)) {
65+ throw new Error(`Provider "${provider.id}" is not a supported work provider`);
WarningMissing provider.kind check before adapter dispatch

`isSupportedWorkProvider` validates the provider ID but doesn't verify `provider.kind === "agent_runtime"`. A provider could pass the ID check but have an incompatible kind, causing unexpected behavior in the adapter.

Suggestion: Add `if (provider.kind !== "agent_runtime") throw new Error(...)` before the `isSupportedWorkProvider` check

6066 }
6167
@@ -98,10 +104,18 @@
98104 let result: WorkRunResult;
99105 try {
100- result = await adapter.startRun(adapterRequest);
106+ result = await adapter.startRun(adapterRequest, async (event) => {
107+ await writeback.handleEvent(event);
InfoEvent streaming enables real-time persistence via writeback

Passing the async callback to `adapter.startRun` streams each event through `writeback.handleEvent`, persisting tool calls and messages as they arrive instead of batching at the end. This is a solid pattern for long-running agent sessions.

108+ });
101109
102- const finalStatus = result.status === "succeeded" ? "succeeded" : "failed";
110+ const finalStatus: RunStatus =
111+ result.status === "succeeded"
112+ ? "succeeded"
113+ : result.status === "canceled"
114+ ? "canceled"
WarningCanceled status may not propagate from all adapters

The ternary maps `result.status === "canceled"` to `"canceled"`, but `WorkRunResult` may not always emit a canceled status — some adapters resolve with `"failed"` and a cancellation message instead, causing user-canceled runs to show as failed.

Suggestion: Check `result.canceledByUser` flag or inspect `result.summary` for cancellation signals as a fallback

115+ : "failed";
103116
104117 await runsService.updateRun(runId, {
105118 status: finalStatus,
106119 endedAt: new Date(),
120+ lastError: result.status === "failed" ? result.summary : undefined,
107121 });

Turn Sentry signals into pull requests

Connect your Sentry project and let Mains prioritize unresolved issues, analyze stack traces, and generate fix PRs — automatically.

Block risky dependencies before they land

Mains checks every package install against Socket.dev before it executes — across npm, pip, cargo, go, and gems. Malware, typosquats, and vulnerable packages are denied automatically.

Dependency Guard·Socket.dev
$npm install express lodash ev1l-logger node-fetch
express4.21.2
lodash4.17.21
ev1l-logger1.0.3
node-fetch3.3.2

Full observability for every agent run

Monitor agent sessions, model costs, and tool usage across all your workspaces — so you always know where time and money are going.

Powerful integrations

Powered by MCP servers and APIs. Mains connects to your tools natively, so your agents can read, write, and act across services without leaving the app.

GitHub
Linear
Notion
GitLab
Jira
Trello
Slack
Figma
Sentry
Asana
GitHub
Linear
Notion
GitLab
Jira
Trello
Slack
Figma
Sentry
Asana

Mains for AI coding agents

Run autonomous agents in secure workspaces, connect your repositories, and move from task to reviewed pull request without leaving Mains.