agent and agentd currently share YAML frontmatter parsing, but runtime semantics are implicit:
agent behaves like a direct CLI interpreter and runs with ambient shell/process capabilities.agentd supervises managed runs (containers/systemd) and applies runtime constraints.Users are confused about whether frontmatter/runtime fields are enforced in plain agent runs, especially for PATH/network/capability expectations.
agent is ambient**: inherit environment/capabilities from parent process (Unix interpreter model, including shebang workflows).agentd is managed**: enforce runtime constraints/capability restrictions.Keep one shared frontmatter format, but clarify field classes:
agent): provider/model/budget/tools/system_prompt/imports.agentd only): toolchain/workspace/assertions and future runtime policy fields.For direct ambient agent runs, managed-runtime fields are advisory metadata and not enforced by agent.
Introduce explicit execution-context signaling from agentd to agent:
AGENT_EXECUTION_CONTEXT=agentd for runs launched by agentd (container/daemon/persistent).This lets agent distinguish ambient vs managed execution without guessing from PATH/process ancestry.
When running ambient agent with managed-runtime frontmatter keys present:
agentd.No behavior breakage for existing shebang/direct workflows.
Extend shared WorkflowMeta with optional runtime-policy keys for future managed enforcement/discovery:
runtime_profile (optional)requires.commands (optional list)requires.network (optional list)These keys are parsed now, documented, and treated as advisory in ambient agent runs.
1. Extend WorkflowMeta parser to include runtime_profile and nested requires.
2. Add ambient-mode advisory warning in agent when managed/runtime-policy keys are present and AGENT_EXECUTION_CONTEXT != agentd.
3. Set AGENT_EXECUTION_CONTEXT=agentd for all agentd-launched paths:
4. Update docs (Omni/Agentd/SPEC.md) to codify ambient-vs-managed boundary and field semantics.
5. Add/adjust tests for parser and runtime-wrapper/systemd template expectations.
agent ./prompt.md continues to run ambiently (no sandboxing added).AGENT_EXECUTION_CONTEXT=agentd.agent and agentd.Follow-up implemented: persistent agentd logs now read from session JSONL (and follow mode tails session JSONL) rather than journalctl; agent advisory behavior is no longer gated on environment variables; AGENT_EXECUTION_CONTEXT propagation/config/docs removed; watch note text updated to session JSONL wording. Verified with typecheck/lint/tests and manual check that agentd logs sd-coder returns session history when journald is empty.
Implemented ambient-vs-managed runtime boundary. Added runtime_profile/requires frontmatter parsing in Omni/Agent.hs, ambient advisory warning for managed-only keys, AGENT_EXECUTION_CONTEXT=agentd propagation in agentd container/persistent/daemon launch paths, and SPEC docs updates. Verification: typecheck.sh Omni/Agent.hs; typecheck.sh Omni/Agentd.hs; bild --test Omni/Agent.hs; bild --test Omni/Agentd.hs; bild --test Omni/Agentd/Daemon.hs.