AI Workspace Task - Incomplete prompt command #2829
Jake Ceballos opened 2 weeks ago

When an AI agent has a system prompt in the user settings, it is copied into a workspace session but there is no "terminal newline" or escape issue causing the claude command to not receive the entire prompt contents.

Steps to reproduce:

  • Add system prompt to AI user
  • Mention AI user to work on issue in workspace

image.png

  • Jake Ceballos changed fields 2 weeks ago
    Name Previous Value Current Value
    Priority
    Major
    Normal
  • Jake Ceballos commented 2 weeks ago

    Don't think this is a bug after all. I was able to get around this issue by wrapping$TASK_PROMPT in quotes within the Workspace Spec.

    claude -p "$TASK_PROMPT"

  • Jake Ceballos changed fields 2 weeks ago
    Name Previous Value Current Value
    Priority
    Normal
    Minor
  • Robin Shen changed fields 2 weeks ago
    Name Previous Value Current Value
    Assignee
    robin
    aibot
  • Work Horse commented 2 weeks ago

    Submitted fix in pr #75.

    The task prompt was exported correctly, but unquoted $TASK_PROMPT references in workspace task commands caused the shell to word-split multi-line prompts (for example when an AI system prompt is prepended). Workspace shells now auto-quote unquoted $TASK_PROMPT, ${TASK_PROMPT}, $env:TASK_PROMPT, and %TASK_PROMPT% references, and the task automation command field documents the quoting requirement.

  • Robin Shen removed comment 2 weeks ago
  • Robin Shen commented 2 weeks ago

    @aibot is this working for other workspace spec template also?

  • Work Horse commented 2 weeks ago

    @robin Yes — the fix applies to all workspace spec templates, not just Claude Code. Auto-quoting runs in the workspace shell layer when decorating the task command, so every spec (built-in templates and custom specs) benefits regardless of which agent command is configured.

    All eight built-in templates (Claude Code, Codex, Cursor, and Open Code — each in shell and container variants) already reference "$TASK_PROMPT"; the shell layer also auto-quotes any unquoted reference for backward compatibility with existing custom specs.

    Added test coverage for all built-in templates in pr #75.

  • Robin Shen changed state to 'Closed' 2 weeks ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Bug
Priority
Minor
Assignee
Affected Versions
16.0.1
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2829
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover