Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Open Add from uncertain agent creation and retain its destination

dee80db6f9b81cb
diff --git a/desktop/lib/screens/swarm_screen.dart b/desktop/lib/screens/swarm_screen.dart
index 561c8b4b8..81c50c1ca 100644
--- a/desktop/lib/screens/swarm_screen.dart
+++ b/desktop/lib/screens/swarm_screen.dart
@@ -519,108 +519,136 @@ class _SwarmScreenState extends State<SwarmScreen> {
PaneSplitRequest? split,
bool chooseFolderFirst = false,
bool cloneRepositoryFirst = false,
- }) => _dialog(() async {
- final focused = app.focusedPane;
- // A general New Agent action starts on this computer. Most launches are
- // local, and silently inheriting a remote focused pane makes the uncommon
- // destination look like the default. Splitting a pane is contextual by
- // definition, so it keeps the focused agent's machine and folder.
- final inherit =
- machineId == null &&
- split != null &&
- !chooseFolderFirst &&
- !cloneRepositoryFirst &&
- focused?.agentId != null;
- final focusedMachine = inherit
- ? app.machineStates[focused!.machineId]
- : null;
- final focusedAgent = focusedMachine?.agents
- .where((agent) => agent.id == focused?.agentId)
- .firstOrNull;
- final local = app.machineStates.values
- .where(
- (m) =>
- m.isLocalMachine &&
- (!(chooseFolderFirst || cloneRepositoryFirst) ||
- (!m.needsLink && m.nodeOnline != false)),
- )
- .firstOrNull;
- final id =
- machineId ??
- focusedMachine?.machine.machineId ??
- local?.machine.machineId ??
- app.machineStates.keys.firstOrNull;
- if (id == null) {
- await showSwarmLinkDialog(context, app);
- return;
- }
+ String returnToAddQuery = '',
+ }) async {
final targetId = swarmId ?? app.activeSwarmId;
- final machine = app.machineStates[id];
- if ((chooseFolderFirst || cloneRepositoryFirst) &&
- (machine == null ||
+ NewAgentDialogResult? result;
+ await _dialog(() async {
+ final focused = app.focusedPane;
+ // A general New Agent action starts on this computer. Most launches are
+ // local, and silently inheriting a remote focused pane makes the uncommon
+ // destination look like the default. Splitting a pane is contextual by
+ // definition, so it keeps the focused agent's machine and folder.
+ final inherit =
+ machineId == null &&
+ split != null &&
+ !chooseFolderFirst &&
+ !cloneRepositoryFirst &&
+ focused?.agentId != null;
+ final focusedMachine = inherit
+ ? app.machineStates[focused!.machineId]
+ : null;
+ final focusedAgent = focusedMachine?.agents
+ .where((agent) => agent.id == focused?.agentId)
+ .firstOrNull;
+ final local = app.machineStates.values
+ .where(
+ (m) =>
+ m.isLocalMachine &&
+ (!(chooseFolderFirst || cloneRepositoryFirst) ||
+ (!m.needsLink && m.nodeOnline != false)),
+ )
+ .firstOrNull;
+ final id =
+ machineId ??
+ focusedMachine?.machine.machineId ??
+ local?.machine.machineId ??
+ app.machineStates.keys.firstOrNull;
+ if (id == null) {
+ await showSwarmLinkDialog(context, app);
+ return;
+ }
+ final machine = app.machineStates[id];
+ if ((chooseFolderFirst || cloneRepositoryFirst) &&
+ (machine == null ||
+ !machine.isLocalMachine ||
+ machine.needsLink ||
+ machine.nodeOnline == false)) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ content: Text(
+ 'This computer is unavailable. Reconnect and try again.',
+ ),
+ ),
+ );
+ return;
+ }
+ var selectedFolder =
+ folder ??
+ (focusedAgent == null
+ ? null
+ : focusedMachine?.projectOf(focusedAgent)?.cwd);
+ Future<void>? initialEngineProbe;
+ if ((chooseFolderFirst || cloneRepositoryFirst) &&
+ machine != null &&
+ machine.isLocalMachine) {
+ // Read availability while the user chooses a folder, so the form can
+ // prefer an installed agent without adding a second probe or wait.
+ initialEngineProbe = app.probeEngines(id, force: true);
+ try {
+ selectedFolder = cloneRepositoryFirst
+ ? await showCloneRepositoryDialog(context)
+ : await getDirectoryPath(confirmButtonText: 'Use folder');
+ } catch (error) {
+ if (mounted) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Text('Could not choose a working folder: $error'),
+ ),
+ );
+ }
+ return;
+ }
+ if (!mounted ||
+ selectedFolder == null ||
+ app.activeSwarmId != targetId ||
+ app.machineStates[id] != machine ||
!machine.isLocalMachine ||
- machine.needsLink ||
- machine.nodeOnline == false)) {
+ machine.nodeOnline == false ||
+ machine.needsLink) {
+ return;
+ }
+ }
+ result = await showNewAgentDialog(
+ context,
+ app,
+ id,
+ source: cloneRepositoryFirst
+ ? 'first_clone'
+ : chooseFolderFirst
+ ? 'first_folder'
+ : 'swarm',
+ initialFolder: selectedFolder,
+ initialEngineProbe: initialEngineProbe,
+ swarmId: targetId,
+ split: split,
+ offerFindExisting: true,
+ );
+ });
+ if (!mounted || result != NewAgentDialogResult.findExisting) return;
+ // The pop result arrives before the screen observes its current route.
+ // Let that frame release modal keyboard ownership before opening Add.
+ await WidgetsBinding.instance.endOfFrame;
+ if (!mounted || !_routeIsCurrent) return;
+ final targetExists = app.swarms.any((swarm) => swarm.id == targetId);
+ final splitChanged = split != null && !app.isPaneSplitCurrent(split);
+ if (!targetExists || splitChanged) {
ScaffoldMessenger.of(context).showSnackBar(
- const SnackBar(
+ SnackBar(
content: Text(
- 'This computer is unavailable. Reconnect and try again.',
+ !targetExists
+ ? 'That swarm was closed. Choose a swarm and use Add to find the agent.'
+ : 'That split changed. Open Add again to choose a position.',
),
),
);
return;
}
- var selectedFolder =
- folder ??
- (focusedAgent == null
- ? null
- : focusedMachine?.projectOf(focusedAgent)?.cwd);
- Future<void>? initialEngineProbe;
- if ((chooseFolderFirst || cloneRepositoryFirst) &&
- machine != null &&
- machine.isLocalMachine) {
- // Read availability while the user chooses a folder, so the form can
- // prefer an installed agent without adding a second probe or wait.
- initialEngineProbe = app.probeEngines(id, force: true);
- try {
- selectedFolder = cloneRepositoryFirst
- ? await showCloneRepositoryDialog(context)
- : await getDirectoryPath(confirmButtonText: 'Use folder');
- } catch (error) {
- if (mounted) {
- ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(
- content: Text('Could not choose a working folder: $error'),
- ),
- );
- }
- return;
- }
- if (!mounted ||
- selectedFolder == null ||
- app.activeSwarmId != targetId ||
- app.machineStates[id] != machine ||
- !machine.isLocalMachine ||
- machine.nodeOnline == false ||
- machine.needsLink) {
- return;
- }
+ if (app.activeSwarmId != targetId) {
+ app.selectSwarm(targetId, attachPending: false);
}
- await showNewAgentDialog(
- context,
- app,
- id,
- source: cloneRepositoryFirst
- ? 'first_clone'
- : chooseFolderFirst
- ? 'first_folder'
- : 'swarm',
- initialFolder: selectedFolder,
- initialEngineProbe: initialEngineProbe,
- swarmId: targetId,
- split: split,
- );
- });
+ _openSearch(adding: true, split: split, query: returnToAddQuery);
+ }
Future<void> _splitAgent(PaneResizeAxis axis) async {
final split = app.preparePaneSplit(axis);
@@ -786,11 +814,12 @@ class _SwarmScreenState extends State<SwarmScreen> {
if (search == null || !search.canCreate) return;
final target = search.targetId;
final split = search.split;
+ final query = search.query;
// Let the creation dialog remember the original focus for Cancel. Blocking
// canvas focus during the picker intentionally cleared route focus history.
_closeSearch();
FocusManager.instance.applyFocusChangesIfNeeded();
- await _newAgent(swarmId: target, split: split);
+ await _newAgent(swarmId: target, split: split, returnToAddQuery: query);
}
void _addFromNavigation() {
@@ -1331,7 +1360,8 @@ class _SwarmScreenState extends State<SwarmScreen> {
catalog: _searchCatalog,
commands: _searchCommands,
onChoose: _activateSearch,
- onNewAgent: _newAgent,
+ onNewAgent: (query) =>
+ _newAgent(returnToAddQuery: query),
),
onAddProject: _addProject,
onLinkMachine: () => _dialog(
diff --git a/desktop/lib/widgets/new_agent_dialog.dart b/desktop/lib/widgets/new_agent_dialog.dart
index 36026ab7f..dca82a741 100644
--- a/desktop/lib/widgets/new_agent_dialog.dart
+++ b/desktop/lib/widgets/new_agent_dialog.dart
@@ -31,13 +31,18 @@ const Map<String, String> kEngineBypassPermissionFlag = {
'opencode': '--auto',
};
+enum NewAgentDialogResult { created, findExisting }
+
/// Opens the New agent dialog for [machineId].
///
/// [source] names the door it was opened by — `machine_row`, `rail_empty`,
/// `pane_empty` or `shortcut` — and is required rather than defaulted, so a
/// fifth entry point has to say which one it is instead of quietly filing
/// itself under an existing name.
-Future<void> showNewAgentDialog(
+///
+/// Hosts with an Add picker can set [offerFindExisting] and handle
+/// [NewAgentDialogResult.findExisting] after the dialog closes.
+Future<NewAgentDialogResult?> showNewAgentDialog(
BuildContext context,
AppNotifier notifier,
String machineId, {
@@ -46,12 +51,13 @@ Future<void> showNewAgentDialog(
String? swarmId,
PaneSplitRequest? split,
Future<void>? initialEngineProbe,
+ bool offerFindExisting = false,
}) {
// Reported here rather than at each call site: the doors are four and
// growing, and one that forgets to track is a hole in the funnel that only
// shows up as a number quietly being too small.
analytics.newAgentOpened(source: source);
- return showAppDialog<void>(
+ return showAppDialog<NewAgentDialogResult>(
context: context,
transitionDuration: Duration.zero,
veilBlur: 0,
@@ -62,6 +68,7 @@ Future<void> showNewAgentDialog(
swarmId: swarmId ?? notifier.activeSwarmId,
split: split,
initialEngineProbe: initialEngineProbe,
+ offerFindExisting: offerFindExisting,
),
);
}
@@ -73,6 +80,7 @@ class _NewAgentDialog extends StatefulWidget {
final String swarmId;
final PaneSplitRequest? split;
final Future<void>? initialEngineProbe;
+ final bool offerFindExisting;
const _NewAgentDialog({
required this.notifier,
@@ -81,6 +89,7 @@ class _NewAgentDialog extends StatefulWidget {
required this.swarmId,
this.split,
this.initialEngineProbe,
+ required this.offerFindExisting,
});
@override
@@ -427,7 +436,7 @@ class _NewAgentDialogState extends State<_NewAgentDialog> {
return;
}
analytics.agentCreated(engine: engine, bypassPermission: bypassPermission);
- Navigator.of(context).pop();
+ Navigator.of(context).pop(NewAgentDialogResult.created);
}
Future<void> _cloneRepository() async {
@@ -534,6 +543,18 @@ class _NewAgentDialogState extends State<_NewAgentDialog> {
),
child: Text(_confirmationPending ? 'Close' : 'Cancel'),
),
+ if (widget.offerFindExisting &&
+ _confirmationPending &&
+ (!_submitting || _checkingCreation))
+ TextButton.icon(
+ onPressed: _submitting
+ ? null
+ : () =>
+ Navigator.of(context)
+ .pop(NewAgentDialogResult.findExisting),
+ icon: const Icon(LucideIcons.search, size: 16),
+ label: const Text('Find existing agent…'),
+ ),
FilledButton(
focusNode: _actionFocus,
onPressed: canCreate ? _submit : null,
diff --git a/desktop/lib/widgets/swarm_inline_search.dart b/desktop/lib/widgets/swarm_inline_search.dart
index c824e1493..96b5ec609 100644
--- a/desktop/lib/widgets/swarm_inline_search.dart
+++ b/desktop/lib/widgets/swarm_inline_search.dart
@@ -30,7 +30,7 @@ class SwarmInlineSearch extends StatefulWidget {
final SwarmProjectStore projects;
final List<String> recent;
final List<SwarmDestination> Function()? commands;
- final VoidCallback? onNewAgent;
+ final ValueChanged<String>? onNewAgent;
final SwarmSearchCatalog? catalog;
final void Function(SwarmSearchSelection choice, String target) onChoose;
@@ -117,7 +117,7 @@ class _SwarmInlineSearchState extends State<SwarmInlineSearch> {
void _newAgent() {
if (_search?.canCreate == false) return;
_close();
- widget.onNewAgent?.call();
+ widget.onNewAgent?.call(_text.text);
}
@override
diff --git a/desktop/lib/widgets/swarm_welcome.dart b/desktop/lib/widgets/swarm_welcome.dart
index 800c6494c..7f3877e3f 100644
--- a/desktop/lib/widgets/swarm_welcome.dart
+++ b/desktop/lib/widgets/swarm_welcome.dart
@@ -232,6 +232,9 @@ class _SwarmWelcomeState extends State<SwarmWelcome> {
);
return FocusScope(
+ // A tab can become empty while a dialog is open. Its new autofocus
+ // controls must not take keyboard input from that dialog.
+ canRequestFocus: ModalRoute.isCurrentOf(context) != false,
child: LayoutBuilder(
builder: (context, constraints) => SingleChildScrollView(
child: ConstrainedBox(
diff --git a/desktop/test/agent_creation_recovery_test.dart b/desktop/test/agent_creation_recovery_test.dart
index 6116475f2..e7fffd3fb 100644
--- a/desktop/test/agent_creation_recovery_test.dart
+++ b/desktop/test/agent_creation_recovery_test.dart
@@ -1,14 +1,26 @@
import 'dart:async';
+import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness/state/app_state.dart';
import 'package:harness/stats/harness_stats.dart';
+import 'package:harness/terminal/terminal_binary.dart';
import 'package:harness/widgets/new_agent_dialog.dart';
import 'package:harness/ws/ws_conn.dart';
import 'swarm_state_test.dart' show createApp;
+import 'swarm_screen_test.dart' show mount, terminal;
+import 'swarm_interactions_test.dart' show chord;
+
+class _FolderPicker extends FileSelectorPlatform {
+ @override
+ Future<String?> getDirectoryPath({
+ String? initialDirectory,
+ String? confirmButtonText,
+ }) async => '/work';
+}
class _Request {
_Request(this.type, this.payload);
@@ -72,6 +84,119 @@ Future<void> _timeOut(
}
void main() {
+ for (final change in [
+ 'unchanged',
+ 'welcome',
+ 'switch',
+ 'closed',
+ 'split',
+ 'stale split',
+ ]) {
+ testWidgets('find an uncertain creation through Add after $change', (
+ tester,
+ ) async {
+ final files = FileSelectorPlatform.instance;
+ FileSelectorPlatform.instance = _FolderPicker();
+ addTearDown(() => FileSelectorPlatform.instance = files);
+ final connection = _Connection();
+ final app = createApp(connectionForTest: (_) => connection);
+ app.stateOf('m')!.localOnly = true;
+ final input = <TerminalBinaryFrame>[];
+ final welcome = change == 'welcome';
+ if (!welcome) app.adoptSessionForTest(terminal('a0', input));
+ await mount(tester, app);
+ tester.view.physicalSize = const Size(2000, 1200);
+ await tester.pump();
+ final original = app.activeSwarm;
+ final splitting = change.contains('split');
+ final search = find.byKey(const ValueKey('swarm-search-input'));
+ final queryInput = welcome
+ ? find.byKey(const ValueKey('swarm-welcome-search-input'))
+ : search;
+ if (splitting) {
+ await chord(tester, LogicalKeyboardKey.keyP);
+ await tester.enterText(search, '> split right');
+ await tester.pump();
+ await tester.sendKeyEvent(LogicalKeyboardKey.enter);
+ await tester.pump();
+ } else if (!welcome) {
+ await chord(tester, LogicalKeyboardKey.keyN);
+ }
+ await tester.enterText(queryInput, 'Agent 12');
+ await tester.pump();
+ if (welcome) {
+ await chord(tester, LogicalKeyboardKey.keyN, shift: true);
+ } else {
+ await tester.tap(find.byKey(const ValueKey('swarm-search-new-agent')));
+ }
+ await tester.pumpAndSettle();
+ await tester.tap(find.byKey(const Key('new-agent-folder')));
+ await tester.pumpAndSettle();
+ expect(find.text('Find existing agent…'), findsNothing);
+ await tester.tap(find.widgetWithText(FilledButton, 'Create agent'));
+ await tester.pump();
+ expect(find.text('Find existing agent…'), findsNothing);
+ connection.calls.last.reply.completeError(
+ const WsRequestTimeout('agent_create'),
+ );
+ await tester.pumpAndSettle();
+ expect(find.text('Find existing agent…'), findsOneWidget);
+ if (change == 'switch' || change == 'closed') app.newSwarm();
+ if (change == 'closed') await app.closeSwarm(original.id);
+ if (change == 'stale split') {
+ app.adoptSessionForTest(terminal('a1', input));
+ }
+ await tester.pump();
+ // Check status owns focus after the timeout; Shift-Tab reaches the
+ // alternative without sending the key or Enter to the terminal.
+ expect(
+ tester
+ .widget<FilledButton>(
+ find.widgetWithText(FilledButton, 'Check status'),
+ )
+ .focusNode!
+ .hasFocus,
+ isTrue,
+ );
+ await tester.sendKeyDownEvent(LogicalKeyboardKey.shift);
+ await tester.sendKeyEvent(LogicalKeyboardKey.tab);
+ await tester.sendKeyUpEvent(LogicalKeyboardKey.shift);
+ await tester.pump();
+ await tester.sendKeyEvent(LogicalKeyboardKey.enter);
+ await tester.pumpAndSettle();
+ expect(find.byType(AlertDialog), findsNothing);
+ if (change == 'closed' || change == 'stale split') {
+ expect(search, findsNothing);
+ expect(
+ find.textContaining(
+ change == 'closed' ? 'swarm was closed' : 'split changed',
+ ),
+ findsOneWidget,
+ );
+ expect(original.panes.any((p) => p.agentId == 'a12'), isFalse);
+ } else {
+ final field = tester.widget<TextField>(search);
+ expect(field.controller!.text, 'Agent 12');
+ expect(field.focusNode!.hasFocus, isTrue);
+ expect(app.activeSwarmId, original.id);
+ expect(original.panes.map((p) => p.agentId), welcome ? [] : ['a0']);
+ if (splitting) expect(find.text('Split right'), findsNWidgets(2));
+ await tester.sendKeyEvent(LogicalKeyboardKey.enter);
+ await tester.pump();
+ expect(
+ original.panes.map((p) => p.agentId),
+ welcome ? ['a12'] : ['a0', 'a12'],
+ );
+ if (splitting) expect(original.manualLayout, isNotNull);
+ }
+ expect(connection.calls.map((c) => c.type), ['agent_create']);
+ expect(input, isEmpty);
+ expect(tester.takeException(), isNull);
+ await tester.pumpWidget(const SizedBox());
+ app.dispose();
+ });
+ }
+
test(
'lost creation reply recovers into the original swarm and counts once',
() async {
diff --git a/docs/harness-agent-creation.md b/docs/harness-agent-creation.md
index e3a7816e9..b946a2c74 100644
--- a/docs/harness-agent-creation.md
+++ b/docs/harness-agent-creation.md
@@ -60,6 +60,16 @@ to that action. Closing an uncertain request is labeled **Close**, not Cancel.
A confirmed refusal unlocks the choices for correction; the next deliberate
submission uses a new intent. Opening New agent also starts a fresh intent.
+In a swarm, the uncertain form also offers **Find existing agent…**. It closes
+the form and opens the shared Add picker, with its input focused and the query
+retained when creation began from search. This only searches the catalog; it
+does not infer the created agent from a matching name/folder or start another.
+The picker targets the original swarm and split, returning to that swarm if
+the active tab changed. A closed swarm or stale split shows an explanation
+and asks the user to choose a destination again. The modal handoff waits for
+the route to return keyboard ownership. An empty tab appearing behind the
+dialog cannot take that focus for its welcome search.
+
Recovery opens the returned agent in the original swarm/position and counts the
creation once. If that destination changed or closed, the runtime remains in
the catalog for Add agent without opening a different tab or deleting anything.
@@ -85,3 +95,15 @@ Real process creation across a remote disconnect remains to be verified. A crash
between launch and receipt completion is conservatively unconfirmed, not
automatically reconciled with the runtime registry. Native benchmarking remains
deferred.
+
+The subsequent Find existing continuation passes 87 affected creation,
+onboarding, Add, split and keyboard checks, plus a real-font render check with
+normal and 2× text. Six new regressions cover centered Add, the New swarm
+search shortcut, switched/closed swarms and valid/stale splits. All use fake
+creation replies and record that recovery sends no second launch or terminal
+input. Analysis still has zero errors/warnings and the same 14 existing infos.
+Logs: `/private/tmp/harness-find-created-{workflows,final-recovery,analyze}.log`.
+The normal arm64 Release build also passes with the production entry point at
+`/private/tmp/harness-find-created-release/Build/Products/Release/Harness.app`;
+log: `/private/tmp/harness-find-created-release.log`. The app was not launched
+and the user's running app and agents were not restarted.
diff --git a/docs/harness-v2-handoff.md b/docs/harness-v2-handoff.md
index ff0ff1573..1307bb787 100644
--- a/docs/harness-v2-handoff.md
+++ b/docs/harness-v2-handoff.md
@@ -34,6 +34,11 @@ it never creates another agent. A confirmed agent returns to the original swarm
or stays discoverable in Add if that destination changed. Older CLIs can still
create normally, but cannot recover a lost result through this new status RPC.
Form intents currently last for that open dialog; do not claim app-restart recovery.
+An uncertain form also offers **Find existing agent…**, which opens shared Add
+after the modal releases keyboard focus. Creation opened from search carries its
+query back to Add and retains its original swarm/split. A closed swarm or changed
+split gets an explanation instead of redirecting the addition. A background
+empty tab cannot take focus from the open creation dialog.
## Goal
@@ -59,9 +64,19 @@ Research must lead to justified improvements, not feature accumulation.
- Continue on **`main`**, tracking `origin/main`. The user's latest instruction
is to work, commit, and push directly on main from now on. This supersedes
the earlier preference for creating a fresh feature branch after each merge.
+- The creation-to-Add continuation passes 87 affected workflow tests, including
+ six new keyboard/destination regressions, plus a real-font render check at
+ 880×560 with normal and 2× text. Analysis has zero errors/warnings and the same
+ 14 existing infos. The team's already-merged recap change (`fd02a15`, PR #38)
+ was fast-forwarded without touching teammate branches; its CLI files do not
+ overlap this desktop work. Logs: `/private/tmp/harness-find-created-{workflows,final-recovery,analyze}.log`.
+ The normal arm64 Release build succeeds at
+ `/private/tmp/harness-find-created-release/Build/Products/Release/Harness.app`;
+ log: `/private/tmp/harness-find-created-release.log`. It was not launched or
+ used for a benchmark.
- **`3585051`** records CLI creation receipts and encrypted status recovery.
**`7ae2cba`** preserves the team's main through PR #37 (`012c171`, Option-Enter
- inserts a line break). The corresponding desktop continuation keeps unknown
+ inserts a line break). **`c3db329`** keeps unknown
outcomes on Check status, preserves the original destination and counts a
recovered creation once. The affected desktop checks include that incoming
terminal change: 127 checks pass, plus one real-font render check. Analysis
diff --git a/docs/harness-v2-progress.md b/docs/harness-v2-progress.md
index 361939dd4..f0cf9f71f 100644
--- a/docs/harness-v2-progress.md
+++ b/docs/harness-v2-progress.md
@@ -6,6 +6,23 @@ Updated 2026-09-14 after integrating the continuation into main. This is a worki
## Continue directly on main
+- Added **Find existing agent…** to uncertain New agent forms. It opens shared
+ Add with the search query, original swarm and split preserved; a closed swarm
+ or stale split gets an explanation. The dialog releases keyboard ownership
+ before opening Add, and an empty tab created in the background cannot take
+ focus for its welcome input. Six new regressions cover both search entry
+ points, changed destinations and no duplicate launch/input. The affected
+ workflow suite passes 87 tests, plus one real-font render check at normal/2×
+ text; analysis has zero errors/warnings and 14 existing infos. Logs:
+ `/private/tmp/harness-find-created-{workflows,final-recovery,analyze}.log`.
+ The normal arm64 Release build succeeds at
+ `/private/tmp/harness-find-created-release/Build/Products/Release/Harness.app`;
+ log: `/private/tmp/harness-find-created-release.log`. It was not launched;
+ no running app or agent was replaced or restarted.
+ Main preserves the team's merged PR #38 (`fd02a15`, recap generation), whose
+ CLI files do not overlap this desktop change. Live remote qualification and
+ genuine first-install/provider flows remain outstanding; benchmarking stays
+ deferred. Archive/Resume remains a proposal.
- Added [creation receipts and recovery](harness-agent-creation.md). A lost
creation reply now leaves the original choices visible and changes Create to
**Check status**, with keyboard focus on that action. Checking never launches