Problem
Currently, log files are named openloop-run-<timestamp>.log (e.g., openloop-run-20260723-143022.log). When running multiple workflows or the same workflow multiple times, it is difficult to identify which logs belong to which project or workflow run without opening each file.
Solution
Add an optional name field to the workflow JSON that is embedded in the log filename. This allows grouping logs by project or workflow run.
Log Filename Format
openloop-run-{name}-{timestamp}.log
Examples:
openloop-run-myapp-coverage-20260723-143022.log
openloop-run-api-tests-20260723-150000.log
If name is empty/not set, the filename falls back to the current format (openloop-run-<timestamp>.log).
Scope — Single Feature
This is one logical feature: the name field is stored in the workflow JSON, displayed/edited in the GUI, and used in the log filename. All three parts are interdependent.
Detailed Design
1. Data Model — WorkflowConfig (core/engine.py)
Add an optional name field:
@dataclass
class WorkflowConfig:
...
name: Optional[str] = None
- Not added to
Config — a workflow name is a workflow property, not an OpenLoop installation setting.
- Serialized to/from the workflow JSON file.
2. Hierarchical Scope
The name field belongs only in the workflow JSON, not in openloop.json (Config). This enforces a clean separation:
Config (openloop.json) |
Workflow JSON |
| System-wide settings |
Flow-specific settings |
agents_dir, workflows_dir, opencode_binary, log_dir, default_max_loops, default_timeout |
loop_agents, preparation_agents, finalization_agents, end_state_condition, max_loops, workdir, init_script, opencode_defaults, name |
3. GUI — Settings > Environment (ui/app.py)
Add a "Name:" field in the Environment section (below Init Script):
┌──────────────────────────────┐
│ Environment │
│ │
│ Workdir: [______________] [Browse] │
│ Init Script: [_________] [Browse] │
│ Name: [_________________] │ ← new
└──────────────────────────────┘
- Optional text input
- Saved to workflow JSON via
_get_workflow_data()
- Loaded from workflow JSON via
_load_workflow_into_ui()
4. Engine — Log File Naming (core/engine.py:_init_log())
Pass the workflow name when executing, then modify the filename:
ts = datetime.now().strftime("%Y%m%d-%H%M%S")
if self._workflow_name:
filename = f"openloop-run-{self._workflow_name}-{ts}.log"
else:
filename = f"openloop-run-{ts}.log"
self._log_path = log_dir / filename
The engine needs to accept the name from the workflow data, either via:
- A new
_workflow_name field set in execute_workflow_data() before calling _init_log(), or
- Reading it from
WorkflowConfig.name in execute_workflow_data().
5. CLI
No CLI changes needed. The name comes from the workflow JSON and _run_cli() already passes the full data dict to execute_workflow_data().
6. Not in State
The workflow name is intentionally not added as a state field. Agents have no need to read the workflow name. If a use case arises later, it can be added to payload at that time.
Implementation Plan
Problem
Currently, log files are named
openloop-run-<timestamp>.log(e.g.,openloop-run-20260723-143022.log). When running multiple workflows or the same workflow multiple times, it is difficult to identify which logs belong to which project or workflow run without opening each file.Solution
Add an optional
namefield to the workflow JSON that is embedded in the log filename. This allows grouping logs by project or workflow run.Log Filename Format
Examples:
openloop-run-myapp-coverage-20260723-143022.logopenloop-run-api-tests-20260723-150000.logIf
nameis empty/not set, the filename falls back to the current format (openloop-run-<timestamp>.log).Scope — Single Feature
This is one logical feature: the
namefield is stored in the workflow JSON, displayed/edited in the GUI, and used in the log filename. All three parts are interdependent.Detailed Design
1. Data Model —
WorkflowConfig(core/engine.py)Add an optional
namefield:Config— a workflow name is a workflow property, not an OpenLoop installation setting.2. Hierarchical Scope
The
namefield belongs only in the workflow JSON, not inopenloop.json(Config). This enforces a clean separation:openloop.json)agents_dir,workflows_dir,opencode_binary,log_dir,default_max_loops,default_timeoutloop_agents,preparation_agents,finalization_agents,end_state_condition,max_loops,workdir,init_script,opencode_defaults,name3. GUI — Settings > Environment (
ui/app.py)Add a "Name:" field in the Environment section (below Init Script):
_get_workflow_data()_load_workflow_into_ui()4. Engine — Log File Naming (
core/engine.py:_init_log())Pass the workflow name when executing, then modify the filename:
The engine needs to accept the
namefrom the workflow data, either via:_workflow_namefield set inexecute_workflow_data()before calling_init_log(), orWorkflowConfig.nameinexecute_workflow_data().5. CLI
No CLI changes needed. The name comes from the workflow JSON and
_run_cli()already passes the full data dict toexecute_workflow_data().6. Not in State
The workflow name is intentionally not added as a state field. Agents have no need to read the workflow name. If a use case arises later, it can be added to
payloadat that time.Implementation Plan
name: Optional[str] = NonetoWorkflowConfigdataclass (core/engine.py)nametofrom_dict()/to_dict()serialization (core/engine.py)ui/app.py)_get_workflow_data()/_load_workflow_into_ui()(ui/app.py)namein engine and use it in_init_log()filename (core/engine.py)docs/cli.mdandREADME.mdif applicable (likely no doc changes needed)