feat(sessions): task-bearing agent sessions (task param + engine-side template expansion) - #696
Merged
Conversation
thedancingdeveloper
force-pushed
the
feat/session-task-and-agent-template
branch
from
September 11, 2026 02:14
a900584 to
7e61cef
Compare
…n agent on X Two gaps behind "spawn a session and check the containers": 1. The session tool had nowhere to put the *doing* part. A session opened on the project brief, which says in as many words that there is no task, and the agent waited — the person then typed what they had just said. session.start gains `task`, folded into the brief under a `## Task` heading so the agent opens already asked to do it. 2. `template` reached the engine as a literal command (`["claude"]`), an unwrapped binary, not the deployment's protected `["vogt-agent-auth", "run", "--", "claude"]`. Vogt now sends the template *name*; the engine expands it against its own `session_templates` by name or tag (an `agent`-tagged template wins an ambiguous tag, so `claude` reaches the protected Claude Code template). The wrapper stays in deployment config, out of the core and out of shipped code. An unknown name is 400 listing the configured templates, never silently a shell. Only taken when no explicit command is given, so the GUI (which sends a command) is untouched. The two together mean "start a session on komodo and check the containers" can open a protected Claude agent already briefed to check them. Engine: SessionSpec.template (contract) + resolve_template_in over the configured templates + expansion in SessionRegistry::create. Core: StartSessionParams.task, EngineClient.create_session template kwarg, _brief_with_task. Tests: template resolves by name then tag, agent tag wins ambiguity, unknown is refused; task folds into the brief and is absent without it; the template is sent by name for the engine to expand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YG9Nsxqc6CREb56Uisnmmy
thedancingdeveloper
force-pushed
the
feat/session-task-and-agent-template
branch
from
September 11, 2026 02:15
7e61cef to
2ba8db6
Compare
thedancingdeveloper
deleted the
feat/session-task-and-agent-template
branch
September 11, 2026 02:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The second half of "the app struggles to understand me": even understood correctly, "spawn a session and check the containers" couldn't be carried out. Two gaps:
session.startgains ataskparameter, folded into the brief under## Task.templateran an unwrapped binary. The core senttemplateas a literal command (["claude"]), not the deployment's protected["vogt-agent-auth","run","--","claude"]. Now the core sends the template name, and the engine expands it against its ownsession_templates(by name, then tag; anagent-tagged template wins an ambiguous tag, soclaude→ the protected Claude Code template). The wrapper stays in deployment config, never in shipped code. Unknown name → 400 listing the configured templates.Together: "start a session on komodo and check the containers" opens a protected Claude agent already briefed to check them.
Scope / safety
commandis given, so the browser new-session dialog (which sends a command) is unaffected.effort/modelnow have a real command to attach to when a template is named, so PR fix(sessions): pass the engine's session-start refusal through verbatim; say effort/model need a template #694's "effort needs a template" refusal resolves into a working session.Changes
SessionSpec.template.resolve_template_in(name → tag, agent-tag wins ambiguity) + expansion inSessionRegistry::create.StartSessionParams.task,EngineClient.create_session(template=…),_brief_with_task.SessionSpec.templatein ENGINE.md.Verified
Engine
fmt+clippy -D warnings+sessions::/api::/agent_tasks::(48 tests). Coreruff/mypy+test_sessions.py/test_session_outcomes.py(72) and the config-doc drift check.PR 2 of 3 (after #695 dictation vocabulary). PR 3 adds server-STT vocabulary + a client preference.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YG9Nsxqc6CREb56Uisnmmy