Skip to main content
An agent is only as good as what it can see. Mains lets you attach precise context to a run — files, diffs, terminal output, a highlighted element, a linked ticket, a Sentry error — so the agent starts with exactly the material it needs instead of hunting for it. Everything you attach appears as a chip in the workspace input and travels with your next message.

Adding Context

The fastest way is the context picker in the workspace input. It groups everything you can pull in:
SectionWhat it attaches
FilesAny file from the workspace, by fuzzy path search
IssuesTickets linked to the project, from your connected trackers
SkillsA skill to run
PluginsA plugin capability
CommandsA provider slash command
Other sources attach from where they live:
SourceHow
DiffSend the workspace’s current change set — see the Diff Viewer
Browser selectionHighlight an element in the Browser Panel — screenshot + selector
Terminal outputCapture output from the built-in Terminal
SignalsA Sentry error with its stack trace

Context Kinds

Under the hood each attachment is recorded against the run with a kind, so the agent receives structured material rather than a blob of text:
KindHolds
fileA file path and its contents
selectionA selected region of code or a captured element
diffA change set
gitA commit or branch reference
terminalCaptured command output
noteFreeform text you typed
Small items are stored inline; large ones are saved once and linked by hash, so re-attaching the same file doesn’t duplicate it.

The Context Window Meter

Every attachment — and every turn of the conversation — spends tokens. The circular Context window indicator in the workspace shows how full the agent’s window is:
StateMeaning
Green arcPlenty of room
AmberNearing the auto-compact threshold
RedThe window is nearly full
Hover it for the exact used / total token counts. Use it to decide when to start a fresh run instead of piling more context onto a saturated one.
Attaching context is additive and reviewable — chips show exactly what the agent will receive, and you can remove any of them before sending. Nothing is sent until your next message.