You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to use --agent option when using run with --attach #8094
When using run with --attach and --agent option you get an exception
instance: No context found for instance
at use (src/util/context.ts:16:21)
at directory (src/project/instance.ts:42:20)
at src/project/instance.ts:63:31
at src/project/state.ts:14:19
at get (src/agent/agent.ts:231:12)
at get (src/agent/agent.ts:230:29)
at src/cli/cmd/run.ts:234:35
at src/cli/cmd/run.ts:232:48
at src/cli/cmd/run.ts:251:21
at src/cli/cmd/run.ts:338:20
at processTicksAndRejections (unknown:7:39)
This issue might be a duplicate of existing issues. Please check:
Specify an agent when attaching to server fails #6489: "Specify an agent when attaching to server fails" - This issue has the exact same error message ("No context found for instance") and identical stack trace pointing to the same source files (src/util/context.ts, src/project/instance.ts, src/agent/agent.ts, src/cli/cmd/run.ts). Both occur when using --attach with --agent option in the run command.
Feel free to ignore if this doesn't address your specific case.
Activity
github-actions commentedon Jan 12, 2026
This issue might be a duplicate of existing issues. Please check:
--attachwith--agentoption in the run command.Feel free to ignore if this doesn't address your specific case.
fix(cli): skip local agent validation in attach mode
alberti42 commentedon Feb 2, 2026
I posted a PR #11812. I believe it fixed the issue.